When terrible things happen, people ask 'where is God?' - and I find it helpful to take the question extremely literally. What does the witness of Holy Scripture tell us about the whereabouts of God during a tragedy?
1. God is in heaven.
When we say that God is in heaven, we affirm that he is absolute king of his creation. Heaven is the place of sovereignty. "Our God is in heaven; he does whatever pleases him." That can be hard to hear in the midst of tragedy, but the alternative is worse: our god is powerless, there was nothing he could do. When we say God is in heaven, we say that nothing - not even this terrible thing - happened outside of his control. Nothing shakes his rule. Now, we can and should qualify this by saying that God rules in various ways, and his will is not fate: he does not bring evil in the same way that he brings good, or will tragedy in the same way that he wills salvation. But he is in control. He is in heaven.
2. God is right here.
God is never a victim, but neither is he a stranger to suffering. The Son of God became incarnate in order to suffer, and specifically in order to suffer with us and for us. When events are more than we can understand or bear, we can be sure that the God who in Christ suffered for us on the cross is with us in our sufferings here and now - and not only ours, but the sufferings of the world. He doesn't miss a single tear or a single injustice. He is right here.
3. God is coming.
Crucially, God is on his way. The witness of Scripture is not to a static God, who remains in heaven, but to a God who comes, who approaches, who draws near to save. When tragedy comes, we can remember that God is coming to judge the world. As far as the biblical authors are concerned, that is very good news. Judgement means the rectifying of everything that is wrong, the final end of suffering and injustice, the wiping away of every tear. It means salvation, for all those who will lift their heads and look for salvation. When terrible things happen, we can be sure that it will not always be this way. He is coming.