God didn't create Satan. He created the cherub that became Satan. (And when I say "cherub," please don't picture a pudgy child in a diaper and wings. Cherubim are magnificent awe-inspiring creatures.)
God gives us free will, and the angels also have free will. The cherub that became Satan became Satan when he exalted himself above God (note the 5 "I wills" of Isaiah 14:12-14). Satan, and the evil angels who followed him, were not made evil by God. They were made beautiful beings to be his servants (see Ezekiel 28:12-17).
Satan of course tempted Eve, and evil entered into our universe when Adam and Eve first sinned, for when they fell, all of the physical creation fell as well. Adam and Eve also had the choice to listen to Satan or to listen to God. They chose ... poorly.
God didn't create evil. Did he know it would come about? Yes. Did he know that particular cherub would shake his fist in rebellion at him? Yes. Did he know Adam and Eve would choose poorly? Absolutely! But that's a far different thing than creating the evil itself.
And if at some point we struggle with why God would create the universe if he knew evil would result, we might possibly say something like ...
- Some things are worth doing even though there will be trouble, than not doing it at all.
- In the end God will triumph over all evil, the good results far outweighing and eclipsing all that evil accomplished.
- He's God, and we're not, and we can understand his ways and his plans about as much as a 2-year-old can understand all that her parents do.