Sure thing, bro. Epicurus is credited with originally formulating the problem of evil (though he probably meant it not as proof that the gods didn't exist, but as proof that the gods were far away and didn't give a fuck about us. After all, the idea that the gods didn't exist was inconceivable to most ancients.) We find his formulation as follows:
"“Is God willing to prevent evil, but not able? Then he is not omnipotent. Is he able, but not willing? Then he is malevolent. Is he both able and willing? Then whence cometh evil? Is he neither able nor willing? Then why call him God?”"The argument runs something like this: Of the following three ideas, only two of them are compatible at any given time:
- An omnipotent God
- A benevolent God
- Evil in the world
An attempt to answer the problem of evil is known as a 'theodicy', and tons of philosophers have attempted them. For example, Leibniz said, "Maybe this is the best possible world. Allowing evil into the world has allowed God to create greater good, and so there is no greater world than this one." Except 40 years after he published that, an earthquake ripped through Portugal and fucking destroyed the city of Lisbon and everything in it, which made a lot of people say, "Really? This is the best possible world? Seriously? Even if a little evil spices things up a bit, do we really need this rampant fucking destruction?" And that was the end of Liebniz's argument.
Any theodicy has to provide a reason why God might allow evil to exist. it doesn't have to show the actual reason he does - that seems pretty fucking impossible, to identify God's actual reasoning - but to succeed it must show that there could be a reason, that evil is somehow compatible with God. Is should also make God as powerful as possible - a theodicy that says, "Well... God isn't as powerful as you'd think" doesn't really get us anywhere. That's just a bro punting the first proposition of the three.
Most contemporary theodicies focus on free will, and philosophers of religion seem to think that this is the most promising line of attack. God gave us free will, and we fucked it up. Why did he give us free will if we were going to fuck up? Because without free will, there can't be any true moral good, since moral good involves making a choice. Even though we fucked up, a world with fucked up people is still better than a world in which there are no people. Back to the idea that the benefits of free will outweigh the negatives.
The right understanding of free will might explain why there's evil per se, but it doesn't really explain certain evils, like the earthquake at Lisbon. Why is such horrific evil acceptable? Peter van Inwagen responded to this idea by saying that we don't get to draw arbitrary lines for God - let's say one fewer person had died at Lisbon. Still horrific? Yeah. What if only one person died? Still horrific? Probably not - that's Detroit on a great day. So what's the magic number in between? "Hey, God, only 4,999 people can die at a time. C'mon. Get your shit together." The suggestion is that God warned us, and we went playing in the minefield anyway. We can't get mad when a fuckton of mines blow up - if God prevented mines from blowing up, we would never try to leave the minefield and get back to Him. Besides, maybe he does prevent some mines from blowing up. What if we had a Lisbon style earthquake every ten years? That would be fucking terrible.
Still, perhaps exploding mines and earthquakes are a bit dramatic for God - couldn't he get us to want to leave the minefield in an easier way? That depends on how stubborn we are in using our free will. But God had to draw the line somewhere; maybe we would have complained about the worst of it no matter what: "Bro, ten people died in a car accident. Fucking ten. Can you believe that shit?! There IS NO GOD."
But even that defense doesn't deal with all evil. Philosopher William Rowe proposes a thought experiment known as "Rowe's Fawn" that removes all element of free will or human choice. Let's say there's this adorable little fawn, fucking cute as can be, walking through the forest, when a tree falls down and breaks his fucking leg. He can't go anywhere, he can't get food, and he just lies there in agony waiting days for the sweet release of death. Now, how the fuck could free will have possibly caused that? Moreover, how could that result in a greater good? No one knows about it; Disney isn't going to make a movie about this one. What benefit could this possibly have?
Defenses to this argument fall into two camps: either that the suffering really is caused by free will in some way, like the butterfly effect, or that there's no way to prevent that sort of suffering without effecting really, really fucking strange laws of nature that don't allow the production of, say, higher intelligence that can produce good. If all pain everywhere is prevented by miracles of God, can we really produce moral good or have free will? So, it's not that that suffering is a result of free will, or even that it itself causes good, but that for there to be the good of free will it has to be a little bit possible that a fawn gets fucked from time to time.
And there it is, a sketch of the problem of evil. It's my experience that people tend to react to arguments one way or another in accord with the position they already have, so if you're an atheist, try asking yourself this: "Who am I to tell God how to run shit? Doesn't He probably know better than me how to accomplish His plan? And couldn't shit be way worse than it has been?" and if you're a theist, try asking yourself this: "Is it really the case that God had to let some of this shit happen? Couldn't an omnipotent being do without some of the terrible shit that's happened? Really, God?" And hopefully, that clarifies the sides for you.
If you want to read more, a good place to start is the Stanford Encyclopedia of Philosophy entry.
Peter van Inwagen's full Gifford Lecture text can be purchased on Amazon, and is, in my opinion, an excellent, accessible, and relatively fair treatment of the problem, although he does come from a theistic perspective to a theistic conclusion: The Problem of Evil.
Oxford University Press publishes a compendium of essays on the topic which fall on either side of the question, which is unfortunately also titled The Problem of Evil: (Oxford Readings in Philosophy).