It may relate to some feature in Finnish cosmology, but one possible answer is may come by way of the Scandinavian god Thor. Horgalles' name is sometimes explained as a form of Thor karl, Old Man Thor, and he may have borrowed his nail from Thor's cult as well.
There are two references to god-nails, reginnaglar, in Scandinavian literature, one of which might explain Horgalles' nail:
Thereafter Thorolf fared with fire through his land out from
Staff-river in the west, and east to that river which is now called
Thors-river, and settled his shipmates there. But he set up for
himself a great house at Templewick which he called Templestead. There
he let build a temple, and a mighty house it was. There was a door in
the side-wall and nearer to one end thereof. Within the door stood the
pillars of the high-seat, and nails were therein; they were called the
Gods' nails. (Eyrbyggja saga)
One of the pillars was carved with an image of Thor, by the way, just to tie it up. Some scholars, such H.R.E. Davidson, connect the god-nails with they myth of how Thor got a whetstone embedded in his forehead while fighting a giant. (Gods and Myths of the Ancient Northmen: 78) She also suggests that the nails were used to strike sparks for fire in the temples. She quotes a late saga, Kjalnesinga saga, as saying that Thor's temple had a fire that was never allowed to go out. (Follow this link to learn more about needfires and how to start them.)