I am so sorry for all the crime in the world that goes uncared after. My answer to your question is in parts:
1. It depends on whom the people are praying too, if they pray to other than The God Himself, The Creator & The Lord of all, that can be unanswered prayers.
2. Yes, we should, first, take it to The God & there is no god but Him, Who has no partners, Who begets not nor was He begotten & there is none like unto Him, for we need His Help & Protection.
3. Then, it is up to leadership to enforce laws. If this were an Islamic State, run by an Islamic leader, I.e. Khalifah, ruling by The God’s laws, this would not be happening, nor would suicide bombings, other murders, rapes, pedophilia, etc. For The God’s laws are severe in such cases when guilt is proven.
4. But the people don’t want The God’s laws, they don’t even worship Him as He Commands, nor love & fear Him as He should be.
5. The condition of this world is our own doing. He has been sending guidance since Noah. But people either, don’t believe, believe falsely, believe but don’t practise, fake belief, & the very few who believe, practise that belief in their lives & try to inform others, are in no power to do anything but pray in situations like these.
6. My personal prayer would be to pray for patience, strength, hope, guidance, justice for the innocent & their family & friends. Then, for The God to enforce justice. To give just dues. For it is not just the violators who are wrong, but it is the leaderships who are in positions to do something about all this, but don’t.
7. We have to, as The God States, save ourselves, then, our families. Take care of home first, the way kids are raised. The way patents treat their kids, etc. The God has sent guidance for all these things in His Last Revelation & thru His Last Prophet, Muhammad. When we don’t practice these, or leave off from them or part of them, the condition of the world is the end results.
8. Since we are in no condition nor should we take things into our own hands, the best & only things are prayers, & making sure you are conducting yourself in the best of manners. Then, running your households in the best of manners. Teaching your families the best conducts, involving yourself in as much good as you can. Help others. Help & protest for the weak & innocent among humans & animals. Volunteer your services where help is needed, nursing homes, shelters for humans & animals. Hospitals. Writing letters, staying on the backs & pulling the coats of leadership.
Talking things over with teachers & principals on how they can make their individual schools safe. Students forming groups that patrol, when they know of or hear of a troubled student, offer help, even if it’s someone just to listen. Have group week. Where the students under a qualified adult sits in & discuss the problems in the school, how to improve things. Take up collections from patents & other people in the area, for it is their school too. Use that money for needed things, like detectors. It’s sad, but needed, cause how are they getting in with sawed off shot guns?
Most of these kids who shoot up schools were troubled, misguided in some way. Even if they were just evil, it is noticeable. But we tend to not know the signs or in most cases, turning a blind eye, for some, we just can’t imagine that my friend, my son, my daughter, my schoolmate, my co-workers, my husband, my wife, my dog, my cat, could ever do wrong.
But dogs bites, cats scratch, kids bully, teens kill, husband’s/wives cheat, co-workers back stab, judges can be bought, cops abuse the laws, presidents sit on their hands, etc.
We the people as a group, in our individual towns & schools, have to do, especially, when we see others won’t. Cause if we wait on the world to change, while we go about our everyday lives, thinking it’s someone else’s job, we are going to be waiting a long, long, time.
On a side note:
Suicide bombers are in hell, for there are two sins The God does not forgive, ascribing partners with or instead of Him. And one who takes his own life.
If you know someone in pain, try & help. Never let hurt escalate to the point of no return. Within one’s own self or in another.
Harming one’s self or others is never the answer. The God is there to Help. And even if you don’t believe in Him, it still doesn’t make harming yourself or others the answer. No matter what.