Atheists love to bring up this argument stating that it would be wrong for God to do so, knowing what would happen. The first question I would like to ask the atheist is “from what moral standard would you be coming from?” If you present the argument as it being wrong for God to do so, then you must be coming from a moral standpoint.
Adam had a good grasp of what right and wrong was. He was an adult and had the free will to chose whether or not to take a bite of the fruit that Eve presented him with. It all boiled down to the freedom that God gave Adam to choose. The freedom to choose opens up the door for sin to entering; you make that choice.
God knew that Adam would sin. Adam and Eve were not automatons. They were tempted and the rebellion nature came through.
It was God’s will to allow Satan into the garden. Do you not think that even as parents we allow our children to do things that we know they will fail at, why would God be any different? It is by our failures that we grow and learn.