God created Satan as a good angel with the freedom to rebel. God is the efficient cause of all else that exists. (See http://carm.org/the-cosmological-argument.) God is also infinitely good. Otherwise, there would be no standard for what constitutes goodness. It is also impossible for God, who is infinitely good, to create anything that is flawed (evil). Just as man was created good and rebelled, the same is true of Satan. Revelation 12:9 is commonly understood as a description of Satan’s fall from heaven after he rebelled against God. Satan is the enemy of God and His people. He is the tempter (Matthew 4:1, 1 Peter 5:8), accuser (Zechariah 3:1), and attacker (Job 2:7) of God’s people. His final destiny is the everlasting torment that awaits him once God’s victory over all evil is complete (Revelation 20:7-10).