Diwali, or Deepavali, is the festival of lights. It is also the festival of wealth. Lakshmi, the goddess of wealth is worshiped on Diwali. Among Bengalis, Mother Kali is worshiped during Diwali. The tradition is attributed to a number of occasions.
There are many stories. One of them goes this way. Two days before Diwali, is Dhanteras. “Dhan” is wealth and “teras” means thirteen. They worship Yama, the god of death. Dhanteras could also be due to another event: the churning of the oceans by the devas and ashuras.
See the entry on Samudra Manthan in wiki. Here’s an excerpt:
The story of Samudra Manthan
Once Indra, the King of Devatas, while riding on an elephant came across a sage named Durvasa who offered him a special garland. Indra accepted the garland but put in on the trunk of the elephant. The elephant was irritated by the smell and it threw the garland on the floor. This enraged the sage as the garland was a dwelling of Sri (fortune) and was to be treated as prasada.
Durvasa Muni cursed Indra and all devas to be bereft of all strength, energy, and fortune.
In battles that followed this incident, Devas were defeated and Asuras (demons) led by king Bali, gained control of the universe. Devas sought help from Lord Vishnu who advised them to treat asuras in a diplomatic manner. Devas formed an alliance with asuras to jointly churn the ocean for the nectar of immortality and to share it among them. However, Lord Vishnu told Devas that he would arrange that they alone obtain the nectar.
Churning the Milky Ocean
The churning of the Ocean of Milk was an elaborate process. Mount Mandaranchal was used as the dasher (churning tool), and Vasuki, the king of serpents, became the churning rope. The gods held the tail of the snake, while the demons (Asuras) held its head, and they pulled on it alternately causing the mountain to rotate, which in turn churned the ocean. However, once the mountain was placed on the ocean, it began to sink. Vishnu in his second incarnation, in the form of a turtle Kurma, came to their rescue and supported the mountain on his back.
Halahal (Also called ‘kalakuta’)
During the Samudra Mathan by the gods and demons, a pot of poison, Halahala, also came out of the ocean. This terrified the gods and demons because the poison was so toxic that it might have destroyed all of creation. On the advice of Vishnu, gods approached Shiva for help and protection. Out of compassion for living beings, Shiva drank the poison. It was so potent that it changed the color of Shiva’s neck to blue. For this reason, he is also called Neelakantha (the blue-necked one, nīla = “blue”, kantha = “throat”).
The nectar of immortality
Finally, Dhanvantari, the heavenly physician, emerged with a pot containing amrita, the heavenly nectar of immortality. Fierce fighting ensued between devas and asuras for the nectar. To protect the nectar from asuras, devas hid the pot of nectar at four places on the earth – Prayag (Allahabad), Haridwar, Ujjain and Nasik. At each of these places, a drop of the nectar spilled from the pot and it is believed that these places acquired mystical power. A Kumbh Mela is celebrated at the four places every twelve years for this reason.
However, the Asuras eventually got hold of the nectar and started celebrating. Frightened, devas (demigods) appealed to Vishnu, who then took the form of Mohini. As a beautiful and enchanting damsel, Mohini distracted the asuras, took the amrita, and distributed it among the Adityas, who drank it. One asura, Rahu, disguised himself as a deva and drank some nectar. Due to their luminous nature, the sun god Surya and the moon god Chandra noticed the switching of sides. They informed Mohini. But before the nectar could pass his throat, Mohini cut off his head with her divine discus, the Sudarshana Chakra. The head, due to its contact with the amrita, remained immortal. To gain revenge on the sun and moon for exposing this, the 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.
The story ends with the rejuvenated Adityas defeating the asuras.
They knew how to spin a great tale.