A family is a social group of 2 or more animals of the same species, that are affiliated by affinity or by blood ties. Human families traditionally tend to be formed between two individuals of opposite sex, with rare exceptions, which are not widely accepted by the society.
The majority of people have a constant need of socialization. Family has been one of the most common ways of socialization for centuries. However, with the invention of phones and internet the need of meeting people in order to talk has disappeared making people less dependent on their surroundings, which lead to less families being formed.
Church tends to enforce traditions onto believers. Since the beginning of humanity, people used to turn to religion to explain the unexplainable. But the more scientific discoveries were made the less unexplainable there was left for church to explain. Going to church once in a week used to be a tradition for the majority of people but as television and the internet were invented some have decided that staying at home might be more entertaining. These two factors contributed to church losing it's followers. Family, being one of those traditions, is affected by the loss of believers.
Even though there are less families being formed nowadays, they will not cease to exist, because new technologies cannot fully substitute being near a real human being.
In my opinion, families are vital for any kind of society, no matter how advanced a society might get, families will always lay the foundation for it.