Narakasura was the son of Dharitri, the earth, by the Lord Himself. But he became a demon due to the bad association of Bana, another demon. An atheist is called a demon, and it is a fact that even a person born of good parents can turn into a demon by bad association. Birth is not always the criterion of goodness; unless and until one is trained in the culture of good association, one cannot become good.
(From SB 3.3.6 purport by Srila Prabhupada)