First of all, every Muslim should steer clear of all sins, major and minor. Faithful Muslims watch every utterance and deed they make, avoiding anything that can subject them to the punishment and wrath of Almighty Allah. As far as the Islamic Shari`ah is concerned, Muslims are required to fear Allah’s wrath and punishment and to hope for His mercy and forgiveness. They have to strike a balance between these two parallels: hope and fear.
When Muslims fall into sins, what they need most is to turn in repentance to Allah in hope of His forgiveness. Indeed, sincere repentance obliterates all sins: Prophet Muhammad (peace and blessings be upon him) said, “Repentance wipes away whatever came before it [of sins]” (Ahmad).
Regarding your question, the late prominent Saudi scholar Sheikh Ibn Baz, said,
No person will be punished for the sins of others. Each person will be brought to account for his or her own sins. Almighty Allah says,
(And a burdened soul cannot bear the burden of another.) (Fatir 35:18)
The father or mother should strictly keep away from sins, lest the family members follow their way.
However, the bad consequences of sins can go beyond the sinner to affect his or her family, as a punishment for the sinner and a test for the family.
Apart from this, it should be known that Almighty Allah tests people with calamities to expiate their sins, and He also tests people with blessings. He, Almighty, says,
(We try you with evil and with good, for ordeal.) (Al-Anbiyaa’ 21:35)
Anyhow, Muslims must avoid sins to guard against the wrath and punishment of Allah.