It's multifactorial problem
There so many factors involved. Almost all of these guy that have been doing these shootings are disconnected from "mainstream" society. (ie loners usually with mental disorders.) Unfortunately our society has moved away from the family towards a group of individuals living under the same roof. An example is family dinner, we strive to make sure everyone is home for dinner at the same table so we can have some quality time with the children. Many of my friends do not do that. Their kids stay in their rooms or in the basement playing video games, which tend to be on violent side, and disconnect from the family.
I am not blaming anyone or anything, like I said, it is multifactorial. All we can really do is to show our children we love them and help them as best as we can.