King Daksha Prajapati had twenty-seven daughters. All of them were married to Chandra, the moon god, on the condition that he would treat them equally. Chandra visited the palace of one wife each night. But he loved only one of his wives, Rohini, and shone the brightest on the night when he visited her. The other wives were sad and complained about this to their father, who cursed Chandra that he would stop shining.
All day Surya, the sun god, nourished Chandra produced divine drink some which nourished the gods lost their source of strength. They ran to Brahma for help. On Brahma's advice, Chandra chanted the 'Mrityunjaya' mantra ten crore times. This pleased Lord Shiva and he partially freed him from the curse. Since then Chandra shines only on certain nights.