The primary function/role I'd ascribe to Bombadil is almost the same same as that of the hobbits: the common man who'd like nothing more than not being bothered with The Great Game. Just with the twist that unlike the hobbits, he actually has the means to make that a reality. Everything else, the age, the powers, the mystery, it's first of all a requirement to make that role possible in Tolkien's world. That it adds depth, mystery, hn frontpage posts, that's all just a nice side effect.
Tom Bombadil predates the story of the ring. It's placed there as a very powerful creature - still would lose to Sauron if all the world fell apart according to Glorfindel [and Gandalf doesn't object either]. That creature has no direct influence on the story, being more of a bystander... similar to the reader.
Tom Bombadil is like the Middle Earth equivalent of a Buddhist sage, just existing without wishing to be more or less than he already is.
Consider:
Perhaps Tom Bombadil represents Santa Claus? After all, Santa Claus has magical powers that utterly transcend what mortal humans can even comprehend. And yet the remains detached from worldly events, never taking a side in wars, never helping human beings during crises that could clearly benefit from his powers, etc.
The truth is that, characters like Tom (and Santa Claus -- if they are indeed not the same person) are fairly common throughout fiction and mythology.
After all, if you invent a character with absolutely transcendental superpowers, you need to explain why the character has chosen not to use those powers to i.e. cure world hunger, or end war, or whatever.
You can see this in... well, any major world religion. Notice how God never directly intervenes in the New Testament, even though he clearly could? Yeah, it's explained.
Broadly speaking Tom Bombadil is like that.