The problem of evil, quoting from the Wikipedia article on the topic, "refers to the question of how to reconcile the existence of evil with an omnipotent, omniscient, and omnibenevolent God".
For Christian theologians, notably starting with St Augustine (AD 354–430), God created a perfect world, but gave Adam and Eve the power to deviate from His chosen path. In that view, God didn't create evil, and instead that evil is the deviation or privation of goodness. The existence of evil, they say, is the price we pay for being able to make free moral choices, and a world in which Man is able to make such choices is better than one were Man isn't, and thus God created a perfect world. This became Catholic doctrine, and this concept is often referred to as all is for the best in the best of all possible worlds, an idea which Voltaire (1694–1778) satirizes to great effect in Candide (1759).
Luther and Calvin stronger belief in predestination leads them to conclude that the fall of man was part of God's plan, and that, ultimately, we might just not be able to understand God's plan.