God created Lucifer or Satan. If all things were formed out of nothing, then so was the angelic realm. The account of creation in Genesis 1 reveals that God created all things and made a moral declaration that what He made was good.
Satan fell from heaven
Folks speculate as to how Satan, the angelic being, became evil and so powerful. Some quote Isaiah 14 and Ezekiel 28 as evidence that Satan sought his own glory over and above God’s glory before the fall of man. However, both passages should be understood in light of their surrounding context as prophecies against Babylon and Tyre. The truth is that there is no Biblical text that explains the process or reason why Satan went from good to evil, but we know that he did. We know that Satan fell like lightning from heaven (Luke 10:18), but what occurred beforehand, we can only speculate. Was there a cosmic battle? Perhaps. Some believe Revelation 12 supports a cosmic battle.
We are set free
God has an eternal purpose for all things that happen. We may try to look into the mystery of His hidden will, but we come up short. Satan does not take God by surprise. The horrendous evil that he exhibits and causes on the earth is foreknown by an omniscient God. Yet, we see throughout Scripture that God turns the tables on evil and Satan. The biggest evidence of this is the death and resurrection of Christ. Through Christ’s atoning work on the cross and the faith that unites us to Him, we are set free from the deserved wrath of God and the dominion of the devil.
Also read: Why was Jesus tempted by the devil?