Reply to invitation promptly and use the correct medium. If you were invited by handwritten invitation it is appropriate to send a handwritten reply; if someone has invited you by email you can reciprocate; if a phone number is given, it is acceptable to call. If you have been invited to a big event, such as a wedding, a reply card is often included so always use this to respond. If you'd like to add anything, such as an explanation as to why you can't attend the event, this should be done in a separate letter.
A reply to official functions and formal private invitations (including weddings) should be sent, if possible, on headed writing paper and written in the third person. Address it to the hostess, even when the invitation is a joint one from both the host and hostess. State the name of any guests you are bringing if the invitation has been addressed to you 'and Partner' or 'and Family.' Reiterate the date and time in the body of the letter.