According to a legend, there was a king named Priyabrat and his wife Malini. They were unhappy because they had no child. So they decided to perform a special sacrifice (Yagya) under the guidance of Maharishi Kashyap. As a result of the sacrifice, Queen Malini got pregnant, but unfortunately she delivered a dead child.
The king became very upset and he decided to sacrifice his life. Suddenly, the goddess Manas Kanya “Devsena” appeared before the king and said: “Oh King, I am Goddess Khashti. I am the incarnation of the sixth part of the universe. Worship me sincerely for six days with pure mind and soul, and you will be blessed with a child.” The king and the queen worshipped the goddess and they were subsequently blessed with a very beautiful child. From then onwards people began the worship of Chhathi Maiya (Shashti Goddess) and celebrating Chhath Puja festival.
Story of Pandavas:
Another story is from Mahabharata. Pandavas faced a lot of troubles during their exile in the forest and one day Draupadi started crying. Seeing this, Yudhisthira approached Sage Dhoumya and sought his advice to find a solution to their problems.
Dhoumya Muni advised Yudhisthira: “Listen to my words, Yudhisthira. The food grains essential for preserving life on earth are the form of Sun God and hence Sun God is regarded as their father. People who worship Sun god with pure heart on the sixth and seventh day of Shukla Paksha in the Kartik Month and chant the 108 names of Surya will be blessed with power, prosperity and wisdom.”
Enlightened by hearing the wise words of Sage Dhoumya, Yudhisthira started worshipping the Sun God with sincere devotion. Pleased by his devotions, the Sun god appeared before Yudhisthira and gave him a copper vessel having magical power. The vessel would prepare four types of food for them and it will last till Draupadi took her meal. Thus their problems were sorted out. Hence, it is believed that if the Sun god is worshipped during Chhath Puja, our desires will be fulfilled and we will be relieved from all our sufferings.