Let's consider, a man not from earth comes to earth as a human baby and represents the salvation of all mankind. He has amazing powers that effect the physical world and can change it in ways that are anti-natural. He is meek around his fellow humans but unshakeable in his attitude towards evil. He is impervious to all forms of danger except one, which if confronted with could kill him. His power is attributed to a heavenly source. He grows up as a human child in a small town and is unknown to the world at large throughout his childhood, but as an adult he has an enormous effect on the entire world. His job is a menial one, but he does his greatest work pro-bono. During a highly troubling time in his adult life, he goes to a secluded, solitary place where he communes with his heavenly father for help and advice. He is murdered, but later he is resurrected.
Now am I recounting the story of Jesus?
No, I was talking about Superman.
Jesus obviously came before Superman, and Batman, and the Green Hornet, etc....
He also was a real person (probably) whereas the superheroes are all fictional characters.
If we examine a bit closer the link between these people we see not just superficial similarities, but also more importantly, the archetypical structure of the solution to mankind's fears and aspirations.
The pyschology of the superhero involves appeals to the "goodness", "morality", "humanity" whatever you'd call it, which is a part of us all. The comic book hero is geared to those humans for whom justice, fair play, and simply doing the right thing is the most natural, namely kids.
We all, however, can see the values that are illustrated and reenforced by these characters. Even such superheroes as Batman and The Incredible Hulk, complete with their darkside are always battling the "forces of evil". Rare is there a superhero who is not illustrative of the qualities we all seek to attain ourselves. They are what we aspire to be (especially when we are kids).
The exhibition of these qualities is what we as humans have been trying to attain throughout our existence, even 2,000 years ago.
In other words the fundamental psychology behind the creation of the superheroes of today, the reason for them if you will, is exactly the same now as it was when the story of jesus was construed. The authors of the gospels including jesus himself, sought to illustrate in a man, the morals they knew would be recognized by their audience at large. The man jesus simply capitalized on the fears he knew to be rampant in his native population. He may or may not have been as calculating as that, he might actually have been convinced he was the son of god, but it's also possible that he was a great con man. It matters not that the stories of his superiority over mankind were transmitted verbally or through writings. The chosen morals were conveyed no matter the medium.
It is superficially more obvious a parallel between characters such as superman or Neo(from the matrix trilogy) and jesus, but the underlying reason for the existence of all superheroes has been with us since our first foray out of the forest and into intelligence.