The Messenger of Allaah (sallallaahu alayhi wa sallam) said:
إِذَا دَعَا أَحَدُكُمْ أَخَاهُ فَلْيُجِبْ عُرْسًا كَانَ أَوْ نَحْوَهُ
When one of you invites his brother, then let him answer whether it be a wedding feast or its like.
[Sahih al-Muslim Hadith No. 1429 and Sunan Abi Dawud Hadith No. 3738]
Based on this Hadiith العنبري said:
تجب إجابة كل دعوة؛ لعموم الأمر به
It is obligatory to answer every invitation [i.e. by attending it] because of the generality of the command of doing so [in the hadiith].
The majority of scholars, however, have understood this and similar hadiith to mean that one is only obliged to attend the wedding feast while it is recommended, and not obligatory, to attend other invitations. And Allaah knows best.
al-Mughni of Ibn Qudaamah
Page 286 Volume 7