During my last visit to the Suryanarayana temple, I brought back with me a small booklet with the history of the temple and the story of the gods who are worshipped there.
This particular temple is unique in that it is devoted entirely to the navagraha. Typically the navagraha are secondary deities, with Shiva being the primary deity; afterall he wears the Moon in his hair. But here there is the main temple for the Sun and each of the other planets has their own, smaller, temples as you see in the photo below.

A long time ago there was a saint by the name of Kalavar who lived on the slopes of the Vindyas. With his yogic vision, he could see that some malefic influences were due to be visited upon him through the navagraha. So he determined that by doing meditations and mantra japa to the navagraha, he could neutralize the influence of the planets.
Well, the planets were not used to all this attention from a human and were quite delighted. The appeared before him and asked him what he wanted. He said that he wanted for he and his descendants be free from affliction by the planets and only enjoy wealth and prosperity. Caught up in the moment, the navagraha eagerly agreed…even though, by the rules of heaven, they were not authorized to do so.
And when the Athi Devatas, or supervising deities of the navagraha found out, they were enranged. They pointed out to the hapless planets that according to Shiva and Kaladeva (another form of Shiva), their job is only to deliver the good and bad karmas to the humans according to their karma.
Well, as one might expect, the navagrahas got cursed and fell to earth where they became lepers and wandered around miserable. They begged and begged for forgiveness and finally the Athi Devatas relented. The Navagraha were told to go the sacred waters at Tirumangalakudi and do a ritual bathing at nine different places there.
Then they retired to do mediations and tapas, and the place they chose to do that is where the Suryanarayana temple is now. In the Mahabharata, King Parikshith is mentioned as worship here and others from that great story worshiped at various of the navagraha temples in the region.
Because the Sun is worshipped here, it is a temple where light is empahsised; thus making it ideal for counteracting the darkness of a prolonged Saturn period!