When a person is invited to a meal and actually attends, mere presence is not enough; he should eat. The host did not prepare that food except that it be consumed: he went to special effort for you, cooked more than his family normally needs, and then invited you. If we were to say that there is no blame on you for leaving the food untouched, his dishes would remain uneaten. For example, suppose he invited ten people and prepared a meal for them, and we held that only attendance was required; if they all stood up and departed without eating, his wealth would be wasted and spoiled, and he would feel resentment toward the guests, wondering, “Why did they not eat my food?”
Accordingly, when someone invites you, the Sunnah is that you accept—except when the inviter is the groom at his wedding banquet (walīmah). In that case, responding is obligatory and it is unlawful for you to refuse, because the Prophet (peace and blessings be upon him) said: “Whoever does not respond has disobeyed Allah and His Messenger,” referring specifically to the walīmah. For other invitations, you are free to accept or decline, such as when someone asks you to share a meal on the occasion of his return from travel, or