The Puranas claim that Rahu and Ketu were created at the very beginning. One of the most significant occasions in the history of Hindu culture is known as “Samudra Manthan.” The “Samudra Manthan” is another association with the solar and lunar eclipse.
‘Amrit’ was created when the Asuras and Devas stirred the seas. Asuras stole this Amrit, thus to get it back, Lord Vishnu assumed the shape of the beautiful lady “Mohini” and made an effort to appease and divert the asuras. Mohini visited Devas to give them the Amrit after receiving it.
One of the asuras, known as “Svarbhanu,” assumed the form of a deva to take some of the Amrit. But Surya (the Sun) and Chandra (the Moon) understood that Svarbhanu was an Asura, not a god. Knowing this, Lord Vishnu used his weapon, the Sudarshan Charka, to cut off Svarbhanu’s head.
His head and body split apart, but they continued to exist as distinct, eternal beings. He was able to take a sip of Amrit nectar before his head was served. Rahu, the name for the head, and Ketu, the name for the body without a head.
Since then, in retaliation for splitting the Asura Svarbhanu’s head and body, Rahu and Ketu have been chasing the Sun and the Moon. According to a common myth, when they catch the Sun and Moon, they drink them and cause a solar or lunar eclipse, however, they can’t keep them for very long before the Sun and Moon break free since they had nectar and were eternal.
Rahu and Ketu, as they are known in astrology, are the two locations where the trajectories of the Sun and Moon cross as they orbit the celestial sphere. Rahu and Ketu are therefore referred to as the North and South Lunar Nodes, respectively. When the Moon crosses these nodes, it occasionally lines up precisely with the Earth and the Sun to produce eclipses.
The tale of the Sun being swallowed by the Moon was created because eclipses only happen when the Sun and Moon are at one of these positions. They are not stationary since the transit is in retrograde motion (counter to the other planets). These cycles of Rahu and Ketu are widely known in Hindu astrology (Jyotish-Shastra). Nevertheless, the characters Rahu and Ketu were rather obscure, secretive, and gloomy due to their connection to eclipses.