Darwin and Theodicy
Darwin's theory explaining the fact of evolution can be used to explain the Problem of Pain. (A typical atheist take can be found here.) Pain (or the events that cause pain) are the driving force behind evolution. If we assume that God decided to produce the human race by means of evolution, pain is inevitable. Evolution works by eliminating failure. Being a failure must happen to somebody and it will be painful in some form.
The fact that evolution is necessarily painful is sometimes mentioned by Christian fundamentalists as a reason to disbelieve it. I respond by pointing out that if they don't like it they should take it up with God.
If, on the other hand, God had decided to produce the human race by Intelligent Design, that would mean human beings are God's robots. According to the Intelligence Amplification interpretation of automation (earlier discussed here and here), that would mean we are mere extensions of God instead of being independent creatures.
In other words, if you want to have your own soul, you need to exist in a universe with pain in it. Besides, the decline of pain in recent centuries might mean evolution is coming to a stop and soon we will be pain-free. That, in turn, means that a finite amount of pain produced an infinite amount of goodness.