I wrote this in 2012 after one of the early school shootings but it works for any tragedy
......After the recent tragedy I was, like everyone, moved to tears and sick of hearing about it, sick of being outraged. I think everyone is asking "why does God allow this." I realize that answers are not satisfying in the sense that they don't stop the tragedy. I still insist that the best time to think about such things and to ask "why does God allow this" is not right after the tragedy sticks but when one is safe and happy and there's no tragedy on the horizon. That way we can think in a raitonal and detached manner about it.
.....During the tragedy when we are grieving and outraged, this school shooting was a total outrage, is not the time to ask the question and expect an intellectual answer. During such a time we have to blame God becuase we have to blame reality. Reality is what it is and we can't change it. When those things strike that we can't stand all we can do is blame the basis of reality for ordering things in such a manner. This answer is basically not for now but it may make more sense latter.
.....The basic question why doesn't God intervene to stop such things? That's something we can't know. We can say some things are so bad God should just stop them regardless of why he doesn't stop other things. Surely gunning down a first grade class counts as one of those things that must be stopped, yet it wasn't stopped. We can't know the perimeters for God's intervention. We faith is part of it but surely those children had faith, the faith of children. Yet we can theorize as to why God doesn't intervene. We may not undrstand why he does at times and not most of the time, but we can theorize about why he does not as a general rule. That's because if he did there intervene every time there would be no need to search for truth.
.....To set the stage, my take on the whole question of theodicy is the free will defense, but I have augmented that with my view about the need for internalizing the values of the good, to me this is the bottom line. It goes like this: God wants us to have free will so we will have a moral universe. Moral universe doesn't necessarily mean one in which nothing immoral ever happens, but one in which free moral agents willing choose the good. Now that is important because without that you don't really have a moral universe, you have to allow free will, meaning allow the risk of evil choices, in order to have a moral universe. So ironically to have a moral universe you have to risk a screwed up universe in which immoral things happen. This is because "moral universe" means " universe where moral decision making is part of the deal.
,,,,,,The reason it's important to allow moral decision making is because it's part of growth. God could make a world of robots who never disobey but that would not be a moral universe, because they would not be free moral agents, there would be no moral decision making. Through moral decisions we internalize the values of the good. To make moral decisions we must seek truth and answers to major questions all of which requires more internalizing of values. So the real bottom line of what God seems to want in creation is a universe in which free moral agents grow in their heart's choices of good over evil and in which they come to be wise, progressive, adult, mature citizens of the kingdom. The price God pays for that is the world has to be screwed up:
(1) The possibility of evil choices must be constant
(2) God can't end all threats of pain and suffering all the time or there would be no search. No search for what one already knows. If every time we almost hurt ourselves some magic force prevented it we would not to search for truth because we would know obviously what the truth is; vis God's existence at any rate. We would figure it all out.
(3) Pain and suffering must exist in such a world Because for God to act to stop them all the time would be a dead give away.
(4) It's no good saying but God could lessen the degree because perhaps he has. We don't have a really horrible planet to compare it to so we don't know what we've been spared.
The Typical Atheist answer to all of this is to multiply examples. They seem to think if they find the most heart rending ironic seeming form of pain then they have proved that God can't really be good. But that doesn't work because it doesn't answer the exact point about internalizing and the need for search. With that understood the point of allowing a world of suffering is always outweighed by negation of the greater harm of being robots. The problem of not having free will would always be a greater evil and you can't multiple enough examples to stack up to outweighing that.
There are a couple of other points to be made:
I1) Only God can calculate the pay off.
There are too many variables and we don't have the complexity (much less the location outside time) to understand the future and what the facts that must be weighed really are. Only God could figure out if loss of free will would outweigh the evils.
(2) We can trust God to make the best decision
We have no choice for one thing, but for another, God is proved worthy of out trust in the atonement and the things he's done in our lives (for those who are willing to corporate long enough to build trust). So we can trust that God is the only true and fair judge who could weight the balance sheet between harms and goods and choose if creation is worth it.
(3) Counter balancing pleasures.
You have the problem of pain you also have the problem of pleasure. Why are we able to indulge in a seemingly unlimited capacity for small and simple pleasures? We we can appreciate them seeming to a greater extent than other animals. we can philosophize about them and develop them, we can even enjoy their deprivation or delayed gratification. There are a veritable unlimited range of good things in life. This is not a night mare planet. Yet nightmarish things happen, but so do you wonderful things. Only God can judge the balance sheet.
......Of cousre none of this is satisfying right now. I'm as clueless as anyone.