According to the Enlightenment worldview, there should be a discoverable, satisfying answer to the problem of suffering. But Enlightenment thinkers said that since we can’t find such an answer, suffering must be meaningless. A good and powerful God wouldn’t allow meaningless suffering. Therefore, God doesn’t exist, or He isn’t completely good and completely powerful.
This line of reasoning is somewhat unique to our time. Before the Enlightenment, people didn’t expect to understand everything. Unanswered questions and unexplained mysteries didn’t signify to them that the universe is meaningless or that God doesn’t exist.