The terrible earthquake and resulting tsunami in Asia has led to a fair amount of soul searching by religious people. It has, less creditable led to some gloating by atheists as well as rather more measured reactions questioning God (such as this from Martin Kettle in the Guardian).
The Problem of Evil is the name usually given to the question as to why an all-good, all-powerful and all-knowing God (the so-called omnimax conditions) allows bad things to happen to good people. The problem first came to a head in the eighteenth century when Hume and Voltaire, the later inspired by another earthquake, asked how God lets evil happen. Oddly, it is rarely those who are actually suffering who doubt God, but rather those who witness the suffering of others from the comfort of their armchairs. For instance, the burning of heretics is a standard example of God being implicated in evil deeds, but the heretics themselves would not dream of using such an argument against his existence. There may be a few atheists in foxholes, but not many.
Evil done by man to other men is explained by the freewill defence. This states that God allowing us to do evil is the price we pay for freewill which is a greater good overall. Not everyone finds this satisfactory but I am willing to accept it as an explanation for moral wrong. It doesn't help at all for earthquakes.
Another explanation is to deprive God of his omnimax status. This is appealing for a number of reasons. First, the Bible gives very little support for the idea that God is infinitely powerful. Rather he is powerful beyond our comprehension which still allows a limit long before we get to infinite. Another limitation, accepted by nearly all theologians, is that God is limited by logic. He cannot make a stone so heavy he can't lift it. He cannot make a square circular or two plus two equal five. Nor, of course, can he make us free and unable to sin. Theologians also claim that God cannot defy his own nature - that he cannot sin or force us to sin. It is entirely possible that logic dictates the kind of universe that he can create as well. Clearly he requires that the universe has integrity and that it runs itself according to the laws he has laid down. Contra Newton, God does not need to step in every once in a while and realign all the planets that have gone astray. It may well be that a universe capable of producing life has to contain certain factors whose trade-offs include natural disasters. God can either step in and prevent the disasters or he can decide that the universe's integrity is more important and that it must be allowed to develop unimpeded.
Where do these possibilities leave us with earthquakes? Why are they necessary? Can we think of a world that works as well as ours but where they do not happen? Frankly, no. Earthquakes are a result of plate tectonics. As the plates on the Earth's surface move around, occasion jolts are inevitable. But why have plate tectonics? For the answer to that we need to look at the Earth's sister planet Venus which has a single solid crust. This sounds great until we realise that the entire surface of the planet is made up of rocks the same age. Every few hundred million years, Venus overheats and the entire crust turns to an enormous field of magna and then reforms once the excess heat has been ejected. So if Earth didn't have tectonic plates and earthquakes there would be no life here at all. Why have a hot core to the planet? Because its flow generates the Earth's magnetic field that protects us from getting nuked by the solar wind generated by the sun.... And so it goes on. There is a reason for everything and some things that are absolutely necessary have side effects that we regret.
None of this helps the victims in Asia. For them, we should dig deep into our pockets. But they should be in our prayers too as God welcomes those who have died and offers his comfort to those who survive. And how much worse it would be if death really is the end? Above all, our trust in God gives us hope even when nature has done her worst.