Once when everything in all the worlds got reduced into Lord shiva, in that darkness of nothing present, the mother pArvati worshipped Lord shiva in the Agamic way with great devotion. The parameshwar pleased by Her prayer blessed Her. She asked for the benefit of all the creatures that in future whoever worships the Lord on the shiva rAtri day with devotion, they should be blessed and should be given the ultimate liberation. The pashupati granted that showing way for all of us to get blessed easily.
When Brahma and Vishnu fought between themselves as "who is the greatest", Lord Shiva appeared before them as a pillar of fire. They were not able to find the starting and end of that pillar. This day is Thirukkaarthikai.(1)
Then Brahma and Mahavishnu repented for their mistake and prayed to Lord Shiva for forgiving their sin worshiping the shiva li.ngam which is the form of the flame. In the night of Shiva rathri Lord Shiva appeared before them and blessed them. Devotees pray the God throughout the night of Shiva rathri by performing Abisheka, chanting and other holy deeds.