The general explanation given by
religious people as to why
bad things happen in this world is that
God created Man with
free will, and sometimes Man is bad.
This doesn't, of course, explain earthquakes and famines and floods and other Acts of God, which by definition are God's own doing.
My personal theory is that God, if such a being exists, is not omnipotent; in fact, he goes so far as to demonstrate incompetence. Sorry, but it's true. If Free Will causes bad things to happen, it was a pretty bad idea to include it in the spec in the first place....
It's only a theory, anyway.