The story which explains why do we draw kolam is found in the Hindu Puranas. The story is associated with the churning of the ocean by Devas and Asuras. Numerous items appeared during the churning of the ocean. When Goddess Lakshmi appeared from the churning, she requested Bhagvan Vishnu for a house to reside.
Vishnu suggested her to reside in a house in which the entrance is sprinkled with cow dung (entrance is pasted with cow dung) and decorated with kolams.
From that day onwards people began to draw kolams to invite Goddess Lakshmi into their homes.
Some Puranas also state that Moodevi or goddess of misfortune appeared during the churning of ocean and she also demanded a house. Bhagvan Vishnu asked her to reside in those houses that are dirty and where they do not draw kolam in front of the entrances.