According to Hindu legend, Saraswati, the consort of Brahma, and Lakshmi on theironce there was an argument between superiority. They went to Indra, the king of the devas. Indra judged Lakshmi as superior, and not satisfied with his argument, Saraswati went to her husband, Brahma. He also chose Lakshmi to be the superior one. Saraswati was unhappy with the decision, and decided to stay away from Brahma.
Brahma did a severe penance praying to Vishnu, and did an Ashvamedha Yagna. Saraswati was still angry that the yagna, which usually is done along with consorts, was done without her by Brahma with Savitri. She tried to disrupt the penance by sending darkness, but Vishnu interfered "like a light from the lamp", hence he is also called as Vilakoli Perumal.
Stucco image of legend
Another version of the legend states that Saraswati sent rakshakas to spoil the penance, which was spoiled by the stream of light from Vishnu. Since Vishnu appeared as light to overcome the darkness of the situation, he is termed Deepaprakasa Perumal.
Vedanta Desika (1268 - 1369 CE) was an ardent devotee of Deepa Prakasa Temple at Thoppul. The devotion of Desika is mentioned in Saranagathi Deepika in 59 verses. He was born in this site. Vedanta Desika also has a shrine inside the temple. And a statue of Hayagriva worshipped by him, also has a temple nearby to him.