here is the list of resources related to this subject
Why does an all-knowing, all-loving, all-powerful God even allow temptation?