A syllogism is a common form of a logical argument. It takes two or more propositions (that are assumed to be true) and draws the required conclusion (which, if the propositions are true, is unavoidable). The classic syllogism is one like this:

All humans are mortal.
Socrates was human.
Therefore, Socrates was mortal.

Neat and clean. Consider, then, the standard syllogism that puts an end to God -- the problem of evil.

God is all-powerful, so He can prevent evil.
God is good, so He would want to prevent evil.
Evil exists.
Therefore, there is no God.

The problem with the syllogism is in the premises. Here is a restatement that might help clear that up:

God is Sovereign, Omniscient, Omnipotent, and Good.
There is evil in the world.
Therefore, God allows it (Sovereign, Omnipotent) for His reasons (Omniscient) for good (Good).

Now, I know, that sounds a bit odd and perhaps offensive to some Christians. Is there any biblical reason why we might think it was true? Sure! Consider Joseph's words to his brothers.

As for you, you meant evil against me, but God meant it for good, to bring it about that many people should be kept alive, as they are today. (Genesis 50:20)

In this statement we see a couple of key components of the thought:

The truth: God meant it for good.
The truth: You meant it for evil.

Joseph's statement speaks of two opposing truths -- God's intention and Man's intention. In this bipolar truth, Man's evil is indeed evil and God's ability to use it for God condemns Man and glorifies God.

Another biblical example is in the story of Judas Iscariot. At the Last Supper, Jesus said, "For indeed, the Son of Man is going as it has been determined; but woe to that man by whom He is betrayed!" (Luke 22:22) Again, two opposing truths. On one hand the events leading to His death were "going as it has been determined." They were unfolding according to God's plan. Jesus would be betrayed as part of that predetermined plan. At the same time, "Woe to that man by whom He is betrayed!" Judas was culpable for the sin of betraying Jesus even though the plan was for Judas to betray Him. (Note: Judas was prophesied. "Even My close friend in whom I trusted, Who ate My bread, Has lifted up his heel against Me." (Psalm 41:9) "I said to them, 'If it is good in your sight, give me my wages; but if not, never mind!' So they weighed out thirty shekels of silver as my wages. Then the LORD said to me, 'Throw it to the potter, that magnificent price at which I was valued by them.' So I took the thirty shekels of silver and threw them to the potter in the house of the LORD." (Zechariah 11:12-13) If Judas had not betrayed Jesus, God would have been wrong.) (Note also that God relied on Judas's free will to accomplish His preordained plan.)

If it is true that God intends evil for good, the question needs to be asked, "What good?" What does the Bible offer to tell us what good might God produce from Man's evil? (Making stuff up won't help. We need to see what the Bible says.)

The Bible says that God's love for us is demonstrated by way of our sin. Paul wrote, "God shows His love for us in that while we were still sinners, Christ died for us." (Romans 5:8) That is, no "sinners", no demonstration of love. At least, not that demonstration. You see, loving the lovable is easy; loving sinners is not. That is a bigger love. This is what Jesus said. "For God so loved the world, that He gave His only Son, that whoever believes in Him should not perish but have eternal life. (John 3:16) "God loved the world in this way." What way? By sending His Son to give eternal life to those who believe. Without sinners, that kind of love could not be demonstrated.

Another aspect is the contrast of good and bad, right and wrong, righteous and unrighteous. If everyone is righteous -- if there is no bad -- then the good becomes obscure. So Paul said, "If our unrighteousness serves to show the righteousness of God, what shall we say? That God is unrighteous to inflict wrath on us?" (Romans 3:5) Our unrighteousness shows the righteousness of God.

There are several more absolutely essential elements of God's character that require evil to be present in order for us to see them. Paul conveniently lists a few in a couple of verses in Romans.

What if God, desiring to show His wrath and to make known His power, has endured with much patience vessels of wrath prepared for destruction, in order to make known the riches of His glory for vessels of mercy, which He has prepared beforehand for glory. (Romans 9:22-23)

There are several traits there. We have God's wrath, God's power, and God's mercy. Go ahead and logically throw in God's grace and justice. None of these would be visible in the absence of evil. Many of God's attributes only show up when God allows for their contrasting conditions.

In other words, God can use human evil to exhibit His glory. He does this without causing or excusing our sin. And what He does with it is glorious.

I do like the rework of the "problem of evil" syllogism from Pyromaniacs:

God can do anything He wishes, so He could prevent evil if He wished.
God is good, so He will not allow evil to go unpunished or reign forever.
Evil exists, will be punished, and it both has been and will be dealt with permanently.
Therefore, repent and believe in the Lord Jesus, or be part of that evil that will be judged and dealt with.