God did not make the devil; He created the angel, Lucifer, who later of his own free will made himself into the devil by opposing the will of God.
Just as Genesis tells us that God created everything inherently good (“and God saw that it was good”), it was only after sin that humans and some angels became evil of their own free choice. Other religions contend that there has always been an eternal struggle between good and evil, between God and the devil. That is called dualism and it is not Christian teaching.
Revelation (Apocalypse) 12:3–9 speaks of a great heavenly battle between the Archangel Michael and the other angels (Lucifer and the third of the angelic host who followed him). The fallen angels were cast into hell and, once there, became known as devils or demons, whereas the two-thirds of the good angels went to heaven and are still called angels.
God originally created the devil and the devil’s demonic followers as angels. Angels, unlike human beings, have no physical bodies. You and I know things by using our bodies, primarily the five senses; the human intellect then abstracts ideas from this sense data. Angels do not see, hear, taste, smell, or feel.
Therefore, all the knowledge they have was given to them (infused) at the moment God created their intellect. Angels knew everything they will ever know at the moment they were created. Their choices or decisions are irrevocable and forever. Angels cannot change their minds. They had one chance and one chance only, but they knew that before they made their choice. Human beings can have incomplete information due to imperfect senses or due to imperfect judgment of their rational intellect on the information given. An optical illusion, for example, is not a case where our eyes are lying to us. Instead, it is an improper judgment of the mind. When someone concludes that a pencil in a glass of water is bent—when in actuality the light rays are bent through the water—it is our eyes that lead us to make that conclusion.
Lucifer and the other angels were given a test. What test we do not know. None of the angels were actually in heaven during or before the test. Once in heaven you can never leave, nor do you ever want to leave. The angels had to prove themselves to God, so God gave them a test. Theologians have speculated for ages what it could have been. Some contest it was that God revealed to them that He would create human beings next and that He would give them a test; those that passed would also be given the reward of heaven.
Lucifer was one of the most intelligent of angels, and it is speculated his pride could not stomach sharing heaven with an inferior creature like man. Angels are as far above us in beauty, intelligence, and power as you and I are above ants, or even microbes.
Other theologians propose that God disclosed the fact He would create man, man would sin, and God would later forgive men and women since our human intellect and will is not like the angelic. We can change our minds and we can repent of evil or we can go bad after a life of goodness. Our capacity to change for the better or worse makes us different from the angels, who only have one chance to do good or evil. The scholars who promote this theory believe that Lucifer was outraged that man would be given a chance to repent or that he would be redeemed by a Savior while the fallen angels would have to spend eternity in punishment and damnation.
Some hypothesize that God showed a vision of Adam and said that, one day, an offspring of Adam would have to be worshiped as God, and the pride of Lucifer turned his heart full of anger and hatred. How dare an angel be asked to bow before a descendant of man, an inferior creature? This offspring, of course, refers to Jesus Christ, Who in His divinity is the Son of God, but in His humanity is the Son of Man, or a Son of Adam. That God would one day take on a human nature and would become one of us, but would never take an angelic nature and became one of them, would have further infuriated Lucifer.
Whatever the test was (this is all speculative), the Bible does tell us that Lucifer and his third were defeated by Michael and the other (good) two-thirds of the angels. Once in hell, he was forever known as the devil, Satan, or the Evil One. He made himself what he is today. God gave him a chance, as God gave Adam and Eve a chance. God gave Judas a chance; he could have freely chosen not to betray Christ for thirty pieces of silver, or, after he committed his sin, he could have repented, as did Peter and the other disciples who let Jesus down when He needed them most. Even evil tyrants like Adolf Hitler or Josef Stalin were originally created good. Each freely chose to become and to commit evil. Mother Teresa of Calcutta freely chose to do and be good while she lived on Earth. She could have chosen the path to darkness, evil, and sin, but she chose the path to goodness and holiness.
If God knew beforehand that Lucifer would go bad, why create him at all? Why not just spare the universe the devil in the long run? Fair question. Again, remember that God creates good. Only creatures with a free will can choose evil and sin, and then face the consequences of their choice.
If God prevented the devil from being created merely because later, after being created, Lucifer would freely choose to go bad, then it is the same as not having a free will after all. If only those who choose good are allowed to exist, what freedom is that? That we can choose to do good or to do evil (although not choose what is good or evil) means there is a consequence to our decisions.
Were the evil people and angels not allowed to exist before they even made their choice, it would not be just. It would be condemning a person before they commit the crime. Punishment must come after the fact, not in anticipation of it. For instance, imagine a parent disciplining a two-year-old child for bad behavior she will commit as a teenager.