Leibniz believed that God, being infinitely perfect1 was forced to create the best of all possible worlds: you're looking at it. The existence of evil is explained with two propositions:
- A world without freewill is less good than a world without evil.
- Our world has the highest ratio of good to evil possible (ie: the minimum amount of evil given #1).
The key proposition that Leibniz left out is: A world with things is more good than a world without. IOW, for God not to create the universe would be an imperfection, therefore He would have to deny his nature to do otherwise.
1: This argument includes the implicit proposition that goodness is a perfection.