Theodicy, as you all know, is the term for reconciling the existence of God with that of evil. The word was coined by Leibniz, and actually generated enough confusion at the time that some French readers thought "Theodicy" was the name of the author.
The problem was first posed by Epicurus in the form, quoting from Nicholas Jolley's Leibniz:
1) God is omnipotent.
2) God is just and benevolent.
3) Evil exists in the world.
The full set of 1, 2, and 3 seem to conflict; the "problem of theodicy" is to show that they don't.
Father Malebranche, a Cartesian contemporary of Leibniz, posed a solution that I think would strike most people as making the problem worse rather than better. As I see it, the average person uninterested in theology and faced with this problem is actually likely to give up 1, and think something like "God is great and really powerful but just hasn't figured out a way to beat that Satan fellow yet -- but in the end he will." While this may be theologically unsatisfactory, it gets him through the day and, more importantly, his religious life.
Malebranche's solution is likely to make him pissed, though. What he contends is that God is morally obliged to act to maximize his own glory, and that a world obeying the sort of laws that permit evil does so to a greater extent than would one that does not. Yow! If Malebranche was seeking to "justifie the ways of God to Man," I think he missed the mark by a wee bit: "You mean I have leprosy so that you can have a little more glory?!"
Leibniz, on the other hand, offers a much more satisfactory solution to the problem, based on his metaphysics, which holds that everything is related to and reflects everything else, and in a way that makes each thing what it is. As Jolley puts it, it is not possible for there to be a world with Mother Teresa but without Hitler, since they are each, in a sense, a part of the existence of the other. So, a world in which the most possible minds achieve the most possible happiness may be one in which great evil exists as a necessary component.
It is also interesting to note that, in some other theistic religions, this problem does not really arise at all. For instance, in Vedic theology, every individual really is an aspect of the one supreme soul -- "that art thou" -- and thus, whatever evil experienced is always befalling God, and is not something He is imposing on creatures from the outside.