All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Accepting the iftaar invitation in Ramadan is not obligatory according to the opinion of the majority of scholars. The only invitation that the Muslim is enjoined to accept is the invitation to a wedding banquet. The Kuwaiti Encyclopedia of Islamic Jurisprudence reads:
"Ruling on accepting an invitation: The majority of the Muslim scholars maintained that the acceptance of an invitation is obligatory in principle if it is an invitation to a wedding banquet; they held different opinions regarding the ruling on accepting any other invitation. The Hanafis, Shaafiʻis, and Hanbalis maintained that it is not obligatory to accept the invitation; rather, it is merely recommended, except for the wedding banquet. This is of course as long as the person being invited does not have a valid excuse to refuse such an invitation and there was no other impediment to accepting it. This applies to the case when the invitation is for a specific and identified occasion such as building a new house, a child’s birth, circumcision, or another occasion - as long as offering such an invitation by the concerned person is not disliked, as is the case with an invitation to attend a gathering to offer condolences to the family of a deceased person - because accepting such an invitation (on the occasion of building a new house, a child’s birth, circumcision and the like) would please the host and bring solace to his heart. The Maalikis, as Ibn Rushd cited, held that it is permissible to accept an invitation to any given occasion other than the wedding banquet (which is obligatory) and the ʻaqeeqah (i.e. celebrating the birth of a new baby); some maintained that it is disliked. However, it is recommended to accept an invitation over a banquet with the intention of fostering good relations and friendship with one’s neighbor. One opinion of the Shaafiʻis suggested that it is obligatory to accept an invitation to a wedding banquet and any other banquet..."
There is no doubt that wasting the blessed times of Ramadaan in idle talk, backbiting, gossiping, and staying up at night, all of this, is considered a valid excuse to refuse an invitation even if it is one of the invitations that a Muslim is commanded to accept, let alone an invitation whose acceptance is merely recommended.
Allaah knows best.