The name implies it has a religious/spiritual function. It is also spoken of by Ben has holding a meaningful significance, something which he probably wouldn't associate with a DHARMA station.
It was built by the hostiles, but at some point, DHARMA gained control of it and turned it into a station, and gave it a DHARMA logo. That's what made the hostiles angry with DHARMA and instigated the purge.
Both the Orchid and Ben's house at the Barracks appeared to be built by DHARMA on the outside but on the inside held something far more ancient. The Temple is another example of this.
The Dharma Initiative discovered these "special areas" and built their structures on them so they could use them as part of their work/experiments. The temple somewhat falls under this same catagory because whoever built it did so because of the unique properties of the Island in that particular area.
Built by Egyptians[]
The temple was built by the Egyptians. The hieroglyphs were Egyptian, including a Horus (the bird) and an Eye of Horus (also known as an Eye of Ra) on the wall. Also the giant statue that we saw during all the time traveling was Tawaret, one of the Egyptian deities. Under the temple on the wall, we saw what appears to be an Egyptian god kneeling before the Monster. Amy's husband, before he was killed, wore an Ankh, an Egyptian symbol of life.
The presence of Romans on the Island suggests that perhaps the Island was once located in the Mediterranean. Perhaps the Egyptians had access to it at that time.
Built by an even earlier culture[]
The Temple Wall has Egyptian hieroglyphs, but placed in an uneven way (i.e. not part of the building or decorative design), which points to them being notes or warnings added on to an even earlier building.
Same for hieroglyphs on the column near the Frozen Donkey Wheel.
We have seen Egyptian, Hellenic (ancient Greek), and now (from the Buddha's shown on the out side of the Temple building) some Buddhist influences. All these are key influences in culture and growth of human civilization. Jacob may have brought different groups at different times, and all have contributes on the buildings and systems we see the Others use.
Most temples are not holy just because they are temples, but are holy or sacred or even considered temples because they are built on or around something else that IS considered to be holy or sacred. Look as the Israeli Temple and the Muslim Dome of the Rock, it's built on Mount Carmel, a Holy place in the history of their religions, this is why the Israeli's won't build their 3rd temple somewhere else, they want it built there.
Function[]
Ben calls it the "last safe place on the island"; it is a strategic stronghold for inhabitants with supplies for survival.
The Temple is able to 'fuse' the souls of some to the 'intelligence' of the Island, and bond itself to them. This bond is somehow symbiotic, so it can heal Ben, extend Richard's life. This is what Richard was talking about when he said it would ruin Ben's innocence and that he would forever be An Other. Ben would be part of the Island, and know things. He would, like John, feel that inevitable pull to unity with the island, and would thus never truly return to DHARMA as an innocent.
The Temple was built as a worship site and gateway for Set and is now blocked so Set cannot return to the desert. In Egyptian mythology, Set was evidently honored with an important temple called the "House of Set, Lord of Sepermer"u and the town it was built in was known as the "gateway to the desert." The description of the temple enclosure included a small secondary shrine called "The House of Set, Powerful-Is-His-Mighty-Arm," and another house for Nephthys, each "under separate administration, each with its own holdings and prophets."
To whom it belongs[]
The temple belongs to Jacob, which we can infer because because his nemesis was unaware of what happened when Ben was in the temple. Or, Jacob built the temple (seen from his Egyptian influences) and it is thus his.
The temple has to belong to Jacob. When the people inside wanted to protect it, they put that black ash all around it (the same ash that surrounds Jacobs Cabin). Since we know that Jacob's nemesis turned into the smoke monster, we know that the monster is not protecting the Temple, it's not able to enter inside it, only under its wall (the place where Ben was judged). The monster does not want anyone going into the temple, where they might side with Jacob.
The temple belongs to Jacob. He built/uses it for a sancuary for the others, a safe place for them to gather in time of need. Much the way we think of a church only I'm not sure they worship him like we do God but see him more as a father figure they strive to please. Smokey is/was bound to the temple wall by Jacob. He used Smokey to guard the temple from intruders and also to bind MIB to the island. With Jacob dead his ability to bind MIB to the temple wall has been lost. This also explains why the others poured the circle of ash around the temple. Since MIB was no longer bound to the wall he could come into the temple at will.
The Temple above ground belongs to Jacob and his followers and the Tunnels underneath function as MIB and follower's Temple. This is similar to the ancient Gods Zeus and Hades one ruled above and one ruled below. This explains why MIB can go into the tunnels underneath the Temple but not the Temple itself.
The Dark Spring[]
The spring water in the Temple was darkened because it reflects the balance between Jacob and the Smoke Monster, and now with Jacob gone the balance has shifted towards the dark. The water was previously clear; the fact that it is now dark must mean the dark is now in control. However, it is unusual that the keepers of the temple were not aware of the reason for the shift in color, although this could be because it has never happened before and they were simply unprepared.
The water was once clear because it was the power of healing people provided by Jacob. Once Jacob died it lost its power to heal, thats why when the leader of the temple puts his cut hand in the water nothing happens.
The spring's ordinary function is "baptism" into the Others; presumably Others like Cindy Chandler were "baptized" there.
The spring runs through or near the exotic matter chamber under the island, giving it it's healing and anti-aging properties.
The muddy brown water which Ben drained to summon the Monster may have something to do with this as well.
The Island has been revealed as a "cork" keeping "malevolence" (The Sickness) trapped, because of Jacob's death some that "evil" spread into the water, infecting Sayid while drowned.