God sovereignly directs events according to his eternal and infallible plan, so that any evil that occurs—including human sin—does so only because it serves some greater good purpose. Arguably the two most striking biblical illustrations of this principle come from the story of Joseph (Gen. 45:7–8; 50:20) and the crucifixion of Jesus (Acts 4:27–28). It turns out that divine predestination is consistent with nearly every greater-good theodicy. After all, if God can have morally sufficient reasons for permitting an evil, then he can have morally sufficient reasons for ordaining that same evil.
This is a tough question to answer in a short space, not least because it ties together two complex and controversial topics! Let’s begin with some basic definitions. The problem of evil refers to the challenge of reconciling the reality of evil with the existence of an all-good, all-powerful God. If God is all-good, presumably he would want to prevent all evil. If God is all-powerful, presumably he would be able to prevent all evil. How then can God and evil co-exist?
As many Christian philosophers have pointed out, the apparent logical conflict can be resolved once we recognize that God could have morally sufficient reasons for permitting an evil; for example, if permitting that evil were necessary to accomplish some greater good. Thus, there is no inherent conflict between the existence of an all-good, all-powerful God and the existence of evil. This insight points us in the direction of a greater-good theodicy: a more detailed explanation of why God permits various evils within the world, whether natural evils (such as diseases and earthquakes) or moral evils (such as murders and rapes). Christian thinkers have developed and defended a variety of greater-good theodicies, but it’s enough for our purposes here to recognize that such theodicies exist and many of them are complementary (i.e., they can be combined to address a wide range of different evils).
So what does predestination have to do with it? The term predestination refers primarily to the idea that God, by some means, predetermines the final destinies of his creatures—either eternal salvation or eternal damnation. However, the term can also be used in a broader sense for the idea that God sovereignly directs everything that takes place in his creation. (As chapter 3 of the Westminster Confession puts it, “God, from all eternity, did […] ordain whatsoever comes to pass.”)