According to legend, during the Samudra manthan, the asura Rahu drank some of the divine nectar. But before the nectar could pass his throat, Mohini (the female avatar of Vishnu) cut off his head. The head, however, remained immortal. It is believed that this immortal head occasionally swallows the sun or the moon, causing eclipses. Then, the sun or moon passes through the opening at the neck, ending the eclipse.
Astronomically, Rahu and Ketu denotes the two points of intersection of the paths of the Sun and the Moon as they move on the celestial sphere. Therefore, Rahu and Ketu are respectively called the north and the south lunar nodes. The fact that Eclipses occur when Sun and Moon are at one of these points gives rise to the myth of the swallowing of the Sun.
In Buddhism Rahu is one of the krodhadevatas (terror-inspiring gods).
In the myth of the Daitya king Jalandhara, Jalandhara sends Rahu with a message to Shiva, demanding that he surrender Parvati to Jalandhara. Shiva was angry at this message, and this anger took the form of a terrible creature which sprang from his brow. It had the face of a lion, flaming eyes, a body which was dry and rough to the touch, long arms and a tongue which lolled with anger. The creature rushed at Rahu, ready to devour him. Shiva apparently said something along the lines of "we don't shoot the messenger" whereon the gana pleaded to Shiva that it was tortured by hunger. Shiva told the gana that if it were so hungry, it should eat its own flesh. This the gana did, until only its head was left. Shiva, pleased with such devotion, appointed the gana as his door-keeper, ordering that it create terror for all wicked people. Shiva also ordained that the gana be worshipped along with his worship, and gave it the name Kirtimukha.
Rahu is lord of three nakshatras or lunar mansions: Ardra, Svati and Shatabhisha or Shatataraka. Rahu is associated with the following: its color is smoky, metal is lead and gemstone is honey colored hessonite. Its element is air and direction is south-west.
In the science of astrology Rahu and ketu are the two intersection points of paths of Earth and Moons travel.
Rahu is mentioned explicitly in a pair of scriptures from the Samyutta Nikaya of the Pali Canon. In the Candima Sutta and the Suriya Sutta, Rahu attacks Chandra, the moon deity and Suriya, the sun deity, before being compelled to release them by their recitation of a brief stanza conveying their reverence for the Buddha. The Buddha responds by enjoining Rahu to release them, which Rahu does rather than have his "head split into seven pieces". The verses recited by the two celestial deities and the Buddha have since been incorporated into Buddhist liturgy as protective verses (paritta) recited by monks as prayers of protection.