The Devil, in the various human cultures and religions of Earth, is a supernatural entity who is considered to be the personification of evil. Different cultures have given the Devil a variety of names, including Satan, Asmodai, Beelzebub, Lucifer, and Mephistopheles among others. In addition to the Devil of Earth mythology, a number of alien cultures had similar beliefs in an evil being similar to the devil.
Satan was a major character in John Milton's "Paradise Lost", who famously said, "Better to reign in Hell, than serve in Heaven." Satan's choice was cited by Khan Noonien Singh (TOS episode: "Space Seed") and by an alternate universe version of Sonya Gomez. (SCE eBook: Lost Time)
The being known as Lucifer was later proved to be based on an actual person. The Megan, Lucien, visited Earth during the early 17th century and barely escaped with his life, while other Megans who visited the planet were executed in the aftermath of the Salem Witch Trials. Lucien would be recorded in human history as the entity Lucifer. In the 23rd century, the USS Enterprise visited Megas-Tu and met Lucien and the Megan race. It was then they learned the full story behind the witch trials. (TAS episode: "The Magicks of Megas-Tu") Much later, Kirk's crew met a race called the Danons, who were revealed to have also played a part in Earth's development of a Devil figure. (TOS novel: Devil World)
In the 24th century, a female con artist learned that the Ventaxian mythological being known as Ardra was expected to return soon. She studied the legend of Ardra very carefully, and appeared when Ventaxian legend said Ardra would reappear. During her encounters with the crew of the USS Enterprise-D, she tried to convince the crew that she was also the Devil and the Klingon entity Fek'lhr. (TNG episode: "Devil's Due")