An event such as the massacre in Orlando is the culmination of a complex of causes. It does no good to try to find just one cause. That over-simplification will do more harm than good because it will distract us from the full range of causes.
That said, it is possible to name some of the more obvious causes and to suggest some parts of the solutions.
At one level, it is obvious that a great many lives would have been saved in Orlando and Sandy Hook and several similar places had there been no access to our own version of weapons of mass destruction. I do not believe there is any conceivable way to defend the sale of attack weapons — assault rifles — to the general public. Gun control is essential. The NRA is an enemy of America so long as it stands for the unlimited arming of any and all people. It is true that gun control alone will not solve the problems but that in no way to any degree means we ought not to bother with gun control. Speed limits on our roads and highways do not guarantee there will be no deaths. Do we therefore ban all speed limits? Of course not.
At another level, it is clear that our nation has a poor record in identifying and caring for those whose mental health makes them more likely than most to commit acts of violence. This is a great challenge and never be anywhere near foolproof. So long as state and national governments provide such limited resources to schools, there is little chance that we can do much to help these people before their imbalance becomes too severe.
People like trump love to say one level of the problem is Islam. Petty minds always try to find scapegoats. Our problem with mass-shootings is not a religious problem. The abuse of religion is a problem but the religion itself is not.
There is another level, deeper and more fundamentally important, that gets less attention because it is so large as to be overwhelming. It is simple to state: America is a violent society, celebrating violence as one of our favorite forms of entertainment. So long as we continue to make money off violence, no other steps will deliver us from the danger of mass killings. Shame on our video game makers; shame on our film makers; shame on our TV industry; shame, shame, shame on the NRA.