I think there are multiple issues which combined form a perfect storm.
I should probably start off by saying I'll turn 55 years old next month, and I can see that the society we live in now is very different from the one I grew up in.
First, the gorilla in the room (and where everyone wants to put the blame), guns. Before 1968 you could have a gun shipped directly to your home, no license, no background check, and if you were willing to pay an extra $200 federal tax it could be full-auto (aka machine gun). We didn't have school shootings then, with easy access to guns, now when it's harder we have them, so the problem seems to lie elsewhere. Besides, if guns magically disappeared things like this would still happen and they'd be worse. How can I say that? Because our own military, when they want to kill people in job-lots, doesn't use guns, it uses explosives, incendiaries, or chemical weapons. You could do a LOT of damage at a school with a case of beer bottles filled with gasoline, some old t-shirts, and a Bic lighter. A little internet research would teach you how to make even worse things.
Here's my take:
We have a culture among young people where likes/shares/retweets/etc are the standard, in other words attention. So if you're always craving attention you'll find ways of getting it. This is nothing new, there were plenty of kids in my school who "acted up" because punishment is a form of attention.
Then there's bullying. There's always been bullying, but the adults response to it has caused problems. Used to be you were bullied, you finally had enough and punched the fucker in the face. Or if he was too big and strong, you banded together with a few other kids he was bullying, jumped him, and sent him home with black eyes and missing teeth. Bullying stopped at that point (I say this from personal experience, I punched my personal bully in the mouth in 5th grade, and my teacher shook my hand). Now kids get suspended for defending themselves against bullys, but the schools refuse to do anything to the bully before it comes to that point. So the anger builds up until you snap.
Next on the list is how we handle boys. Boys are naturally aggressive, because of the chemical cocktail of hormones raging thru them, but there are fewer and fewer acceptable methods of channeling that aggression. Things like (tackle) football, boxing, martial arts, or even the occasional after-school fist-fight. Couple that with the large percentage of boys who are raised in single-parent (usually mother) households, the boys lack a male figure who's actually been through it himself and who can guide the young man into safe, respectable ways of using their aggression. Instead the kids have to repress it, pretend it doesn't exist, and it's eventually going to come out.
Then there's the media. Shooting up your school is a quick way to become an instant celebrity, everyone will hear your name man! See the point above about attention. If the media would decide not to publish the names of mass murderers (like they currently do with rape victims) that aspect would disappear overnight.
So we have naturally aggressive boys who have never learned how to channel that aggression, a desire for attention, a society that doesn't allow them to defend themselves against bullies, and a media that's willing to make them into instant celebrities if they just kill a bunch of people. What could possibly go wrong?