Conditions of Accepting Invitations in Islam
Question

Sometimes I am invited to a meal or to a party. What should I do if these gatherings are mostly filled with backbiting, slander, showing off and competing in clothes, where they make fun of those who wear simple clothes (like me)? There may also be gossip, and I have housework to do (I don’t want to bring a servant, but nearly everyone who attends these parties has a servant so she has free time). 
My husband and my house need me, and every moment I spend at home matters in sha Allah. This is my primary mission. I also want to spend any extra time I have in reading the Quran or a useful book. I don’t want to attend worldly gatherings whose harm, as I see it, outweighs the benefits – if there are any benefits. Please advise me, how should I deal with this? What suitable excuse can I give for not attending, if I have the right not to attend? 
What should I do if the hostess of the party looks down on me and enjoys seeing me in an embarrassing situation and talks about me? Do I have to accept her invitation?
Praise be to Allah.Rights of a Muslim over another 
It was narrated by Al-Bukhari (1164) and Muslim (4022) that Abu Hurayrah (may Allah be pleased with him) said: “I heard the Messenger of Allah (peace and blessings of Allah be upon him) say: ‘The rights of a Muslim over his fellow Muslim are five : returning greetings, visiting the sick, attending funerals, accepting invitations, and saying Yarhamuk Allah (may Allah have mercy on you) when he sneezes.’” 
Categories of invitation which Muslims may accept
The scholars divided invitations which a Muslim is commanded to accept into two categories: 

Invitation to a wedding party (Walimah). The majority of scholars said that it is obligatory to accept such an invitation, unless there is a legitimate Shar`i excuse – some such excuses will be mentioned below. 

The evidence that it is obligatory to accept these invitations is the Hadith narrated by Al-Bukhari (4779) and Muslim (2585) from Abu Hurayrah (may Allah be pleased with him), that the Prophet (peace and blessings of Allah be upon him) said: “The worst kind of food is the food of a wedding feast that is withheld from those who would come (the poor) and to which people (the rich) are invited who may refuse it. Whoever does not accept the invitation has disobeyed Allah and His Messenger.” 

Invitation to various kinds of gatherings other than wedding-feasts. The majority of scholars say that accepting these invitations is commendable, and no one differed from that apart from some of the Shafi`is and Dtahiris, who said it is obligatory. If we say that it is strongly commendable, then this is close enough. And Allah knows best.  

Conditions of accepting invitations in Islam
The scholars have stipulated conditions for accepting an invitation; if these conditions are not met then it is not obligatory or commendable to accept the invitation, rather it may be prohibited to attend. These conditions were summed up by Shaykh Muhammad ibn ‘Uthaymin (may Allah have mercy on him), who said: 

There should be nothing objectionable in the place where the party etc. is to be held. If there is something objectionable and it is possible to change it, then it is obligatory to attend for two reasons: to accept the invitation and to change the objectionable thing. If it is not possible to change it then it is prohibited to attend.
The host should not be someone whom it is obligatory or recommended to forsake (such as one who openly commits immoral actions or sin, where forsaking him may be of benefit in bringing about his repentance). 
The host should be a Muslim. If he is not, then it is not obligatory to accept the invitation, because the Prophet (peace and blessings of Allah be upon him) said: “The rights of a Muslim over his fellow Muslim are five…”
The food offered should be permissible for us to eat.
Accepting the invitation should not lead to neglecting a more important duty; if that is the case then it is prohibited to accept the invitation.
It should not cause any trouble to the person who is invited. For example, if he needs to travel or to leave his family who need him there, and so on. (Al-Qawl Al-Mufid, 3/111)

Some scholars added: 

If the host issued a general invitation, saying that everyone is welcome, then it is not obligatory to accept the invitation.

Can you accept invitations for gatherings filled with backbiting, slander, etc.?
From the above it should be clear to you that you do not have to accept such invitations, rather it may be prohibited for you to do so, if you cannot change the reprehensible things or if your attending the gatherings will affect your duties towards your husband and children and prevent you from taking care of them as you are supposed to do. 
Moreover, you will not be safe from their evil and harm. This is an excuse which frees you from having to accept invitations that you are obliged to accept, let alone those which are not obligatory at all. 
Women should also note that they have to ask their husband’s permission to go out to parties etc. to which they are invited. You should advise these sisters to try to make the best use of their time and their gatherings in ways that will benefit them either in religious or worldly terms. For the Messenger of Allah (peace and blessings of Allah be upon him) warned us of the consequences of attending gatherings in which Allah is not mentioned. He (peace and blessings of Allah be upon him) said: “No people sit in a gathering in which they do not remember Allah or send blessings upon their Prophet, but they will regret it, if He wills He will punish them and if He wills He will forgive them.” (Narrated by At-Tirmidhi, 3302; he said, this is an authentic Hadith. It was also classed as authentic by Al-Albani in Sahih Al-Tirmidhi, 3/140)  
In Sunan Abu Dawud (4214) and other books, it is narrated that Abu Hurayrah (may Allah be pleased with him) said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: ‘People who get up from an assembly in which they did not remember Allah, will conclude it as if it has foul odour similar to that of a rotten carcass of a donkey. And it will be a cause of grief to them.” (Classed as authentic by An-Nawawi in Riyadh Al-Salihin, 321, and by Al-Albani) 
Convey this advice to them, either verbally or in writing. In addition, you could invite them to your house and make the most of this opportunity to hold a study circle, in addition to doing some permissible things that they will like. Perhaps Allah will make you the means of starting a good trend of benefiting from such gatherings.
And Allah is the Source of strength.