A story found in the Puranas state that Atri Maharishi became Surya (Sun) and Chandra (moon) to help Devas in a battle against Asuras. Atri Maharishi is one of the Saptarishis and details about this great saint are found in the Rig Veda, Mahabharata, Puranas and other holy scriptures.
Devas and Asuras were engaged in a battle for several years. The arrows from Asuras shut out the light emanating from Surya and Chandra. The world plunged into darkness. Devas could not see anything and Asuras started taking advantage of the situation as they were used to darkness in the netherworld.
Devas then approached Atri Rishi. The powerful saint had acquired unlimited powers.
Immediately Sage Atri took the form of Chandra and Surya. One part of his body became Surya and the other part became Chandra.
He then gave light to Devas as Chandra.
He gave intense heat to Asuras as Surya. The heat killed the Asuras and Devas were able to take control of the world again.