The sunnah of attending a wedding:
If invited to a marriage ceremony or a wedding celebration, you should accept the invitation unless it includes prohibited acts. Attending a wedding is part of noble sunnah of the prophet sallallahu alayhi wa sallam. Islam regards marriage as an act of worship and obedience to Allah. For this, the jurists have mentioned that, it is preferable (mustahab) to contract the marriage in the masjid.
This is based on a hadith reported by Imam Tirmidhi and Imam Ibn Majah:
Publicise the marriage, execute it in the masjid and celebrate it with the duff.
Another hadith by Imam Ahmad and Al-Hakim and others supports the first part of the hadith:
Publicise the marriage.
It is also supported by a third hadith reported by Imams Ahmad, At-Tirmidhi, An-Nasai and Ibn Majah:
The difference between a legitimate (halal) marriage and illegitimate (haram) relationship is the presence of voices and the duff.
There is no dispute among Muslim scholars that in a wedding celebration, the prophet sallallahu alayhi wa sallam allowed women to use the duff. The most valid opinion among scholars is that men can also use the duff in order to publicise the marriage, thus making it known far and wide.  The noble Islamic purpose of such publicity is to distinguish between an evil and illicit relationship and an Islamic, pure and halal marriage.
The hadith mentioned above:
The difference between a legitimate (halal) marriage and illegitimate (haram) relationship is the presence of voices and the duff,
is explained by our ulama as follows:
By voice is meant that the nikah should be announced and mentioned to the people. Voice also refers to the singing of legitimate anashíd (Islamic songs).
Attending a wedding is one of the rights of brotherhood among Muslims. It fulfils the requirement of publicity and it reinforces the testimony of marriage. It also gives you a chance to join your brethren in this pious act by which they complete half of Islam, which leaves only the second half for them to uphold. Attending a wedding also honours the husband and wife by having the relatives, friends and other pious people to share in their happiness. It blesses them with guests who pray to Allah for their righteousness, success, affluence and prosperity.
The manner of attending weddings:
When you are invited, attend with the intention that you are attending a blessed and good invitation, one which is delightful and approved in the shariah. The prophet sallallahu alayhi wa sallam has also commanded us to attend such occasions. Dress appropriately within the confines of shariah. For such pleasant gatherings, the sahabah dadiallahu anhum used to dress properly when they visited each other. When initiating or sharing in a discussion, make sure your conversation fits the happy occasion. Dont discuss such things which will depress those present or any other distasteful subject matter. A believer should be wise and considerable.
It is recommended that you congratulate the bride and bridegroom by reciting the dua of the prophet sallallahu álayhi wa sallam:
Barakallahu laka wa baaraka alaika wa jamaa bainakuma fi khair
May Allah bless you and bless your counterpart and may Allah tie your union with virtue. [Sunan Abi Dawud, Sunan Tirmidhi, Sunan Ibn Majah and Al-Hakim]
Do not use the commonly used phrase with comfort and children, because this was the phrase used by people of Jahiliyah (ignorance). The prophet sallallahu alayhi wa sallam has prohibited it and Allah has replaced it with the prayer of the prophet sallallahu alayhi wa sallam (as mentioned above).
Aishah radiallahu anha said, When the prophet sallallahu alayhi wa sallam married me, my mother led me into the house where the women of the Ansar were seated. They congratulated me by saying,
May you have all the good, all the blessings and the best of luck. [Sahih Bukhari]
Islam permits women to celebrate a wedding by singing tasteful songs accompanied by beating of the duff. Such poems and songs should not promote lust, lewd desires and sin. Instead, they should sing delightful and decent songs to express their happiness and joy with the marriage.
Aishah radiallahu anha said,
A bride was led to her Ansari husband. Rasulullah [Sallallahu alayhi wa sallam] said, O Aishah! Do you not have any items of entertainment? The Ansar love to be entertained. [Sahih Bukhari]
The prophet sallallahu alayhi wa sallam was referring to singing and beating of the duff.
Hafidh Ibn Hajar rahimahullah in his book, Fathul Bári, has stated that in one narration of Tabarani, Sayyidah Aishah radiallahu anha recalled that the Prophet sallallahu alayhi wa sallam asked,
Why did you not send with her (the bride), a girl to sing with the duff? I enquired, What should she sing? He answered:
We are visiting you, we are visiting you,
If you greet us, we will greet you,
For your gold, bright and red, brought the
Bride to your valley,
And it is your brown and tanned wheat that
Made your virgins charming.
Songs sung at wedding should have delightful and decent meanings such as this. Songs of lust, passion and immorality are strictly prohibited.
Taken from islamicetiquette.wordpress.com
 Take note that the actual purpose of the duff was to publicise the marriage and not mere entertainment.(NOTE: If you want to build a strong and powerful relationship with Allah, check out Islamia TV, where you can watch Islamic speakers from across the globe deliver inspiring and motivational courses. Learn more at www.islamia.tv.)