Q. Is it allowed to decline a family invitation from an impious family member?
It is extremely important to maintain ties of kinship (silat al-rahm) even if one’s relatives show little interest in reciprocating the obligation. However, if one declines an invitation of a family member out of a statement of protest to his family member’s open impiety, then this is permitted. However, one should open channels of advice and discussion in order to help change their attitudes. In al-Fatawa al-Hindiyya it mentions:
“[…] A fasiq’s invitation should not be accepted in order to show one’s disapproval of his fisq [s: open impiety] and it is mentioned in al-Rawda: his invitation should be accepted and what is more scrupulous is to avoid it…”
لا يجيب دعوة الفاسق المعلن ليعلم أنّه غير راضٍ بفسقه و في الروضة يجيب دعوة الفاسق والورع ان لا يجيبه…
And Allah knows best.
 See al-Fatawa al-Hindiyya, 5:343.