As easy as it is to blame parents, that is not entirely fair. Plenty of people come from broken homes or rough situations that end up being great people and law abiding citizens. I think we all agree the better home situation, the better outcome for most if not all kids, but I am not sure bad home situations create mass shooters either. The ultimate responsibility lies with these shooters making the decisions they made.
I think it is fair to blame parents at least in part. It is true that many who come from bad homes turn out fine, and many who come from good homes do not. However, you can also run a red light several times and not get in a wreck. That doesn't make running red lights a safe or reasonable course of action. We know that running red lights greatly increases the likelihood of a wreck, and we know that raising children in bad homes greatly increases the likelihood of those children turning out badly, whether it's drug abuse, sexual abuse, violence of all kinds, etc.
As parents, it's our job to instill values and create a home culture of decency for our children and to protect them from crappy values and indecency. Others may be involved in that job, but it's ours first and foremost. What does that mean?
First, show up. Right now, that's the biggest and most common form of social depravity we have - cowardly "males" (they don't deserve to be called "men") who ditch their children. If you're a father who abandons your kids and the mother of your kids, you're a piece of **** and a disgraceful human being, and society should call you out for being a disgrace every chance it gets. There should be tremendous and overwhelming public shaming of guys like that - from family, from the family of the impregnated woman, from government, from employers, from the popular cultural - everybody. I don't know who started the idea that child abandonment by fathers was OK or something not to be condemned or "judged," but that person should be horsewhipped. That doesn't mean that it's never justified to divorce with children. It is, but culturally we've gone way too far in telling people that "it's all good." The fact that telling a politically incorrect joke is more culturally damaging than leaving one's kids is a disgrace on the culture.
Second, build a home that doesn't have a coarsened culture. Don't let garbage entertainment into the home especially when children are young - not because sheltering our kids from it will make sure they never hear or see it but because allowing it gives the impression that it has the parent's blessing or that it isn't a "big deal." By the way, garbage entertainment isn't just nudity and violence, which is what too many focus on. Much worse is bad examples. Though I wouldn't seek out either one, I'd rather my son see some righteous killing on TV or a boob in a movie or on a beach than to see kids on TV shows celebrated or made to look funny for acting like disrespectful twerps to their parents or teachers.
Furthermore, ensure that we aren't coarsened ourselves, particularly when our children are young. For example, I know I sometimes have a dirty mouth and show it here from time to time. I sometimes use profanity and make sexual remarks here (S.E. Cupp, Hope Hicks, even the nicely-bosomed Mrs. Deez). However, Deez, Jr. has never heard me use foul or lewd remarks even about his mother. Why not? Because it sets a bad example for him. Verbally, he imitates me to an astounding degree. He talks almost exactly like I do, and I don't want him to view women disrespectfully or talk about them as sex objects.
Finally, if we're religious, we ensure that the values presented by our religion get instilled into our children. As Christians, that means we find a good church for our kids and ensure that the family shows up regularly. It also means that we pray and read the Bible with our children daily. If we're not religious, then we need to find ways to instill civilizing values into our children. I don't know what that looks like because I grew up in a religious home, but I know it can be done, because I know many nonreligious people who find ways to do it.
Third, we protect our kids from crappy cultural forces outside the home, and the biggest cultural influence outside of the home is going to be school. If our kids are in a school that celebrates crappy values as so many do, it's our job to remove them from those schools. Furthermore, it's our job as parents AND as citizens to be engaged at the civic level to ensure that schools don't celebrate crappy values, and for the last 40 years, we've been horrendously bad at that. The fact that millions home school or use private schools even though they're forking out thousands in tax dollars per year for public schools should be a massive badge of shame for the public school system, school boards, and state legislatures. It's not, but it absolutely should be.
The bottom line is that while not every bad guy has had a crappy home and not every crappy home creates bad guys, the crappy home is the most common denominator. Somebody has almost always screwed up in a big way. There's a missing or checked-out dad. There's a skanky mom. There's a child molester who was allowed to get too close. There's a school teaching BS. Or some combination of these. Unfortunately, these problems are the hardest to fix, because there isn't a government solution. It's familial and cultural.