The story
Brahmā and Viṣṇu argued about which of them was greater. Śiva settled it by becoming a column of fire with no top and no bottom, and told them to find its ends. Viṣṇu went down as a boar and Brahmā up as a swan; neither reached an end, and Viṣṇu admitted it while Brahmā lied.
The hill at Tiruvannamalai is held to be that column, cooled into rock. On this night a beacon is lit at the summit in a cauldron of ghee, and it burns for days and can be seen for miles.
The lamps in the doorways below are the same fire on a household scale — the oldest festival of lights in the Tamil country, older in the literature than Dīpāvali is there.