Sidekicks are the most abused characters in comicdom. As such, I need to re-iterate that they are useful.
The bottom line is that your hero can't be everywhere, and can't do everything. Worse, he can't talk to himself. Yeah, he clone himself and talk to himself, but that doesn't work from a dramatic perspective; without limits your character can get very boring very quickly, and insane characters can't really be understood (and if they are, are they insane?). In an ensemble setting, a group of characters that can do everything will definitely get boring quickly.
The sidekick takes up some of this slack. The sidekick can do things that the hero can't, and allows the hero to think things out when things have gotten rough. The sidekick can also act as a medic or seamstress, for those characters that regenerate or have self-repairing costumes. He can also set needed appointments, and remind the hero of those appointments. He can also make sure that the lair is clean and equipment maintained. Like the apprentice of old, the sidekick is capable of many things, and not just in the sense of super powers.
At the same time, the sidekick needs his own maintenance. He needs the slap on the back, the dint of recognition, and it helps to be paid every so often. The sidekick has his own goals, which, just because they align themselves with the hero, doesn't mean that they are the same or that they don't diverge. The sidekick has to be allowed to pursue those goals, and even have a live of his own that doesn't involve the hero.
And that's an important point that needs to be considered here: The sidekick has to be able to go to college, have a significant other, or just go to the local Indian casino every so often. Their existence need not be defined by the hero, and that serving as a sidekick may just be some form of community service, a way for a would-be hero to learn the ropes before becoming a hero themselves, or as a way to help someone do something that they could not. Some of them do it for baser reasons, such as revenge, lust, or even pay; those motivations need to be considered just as much as higher motivations.
The sidekick can also act to add drama, but I highly suggest you debate putting the sidekick in danger more often than you really need to. The sidekick may be an easy target for the villains to kidnap and endanger, but if it's more than a few times then it loses its punch. Not only does it question the competence of your hero and what the sidekick has learned, but it also questions your own skill as a writer (if the only way you can make things more interesting is to imperil the sidekick, then the question of your competence comes under fire). And this definitely applies to girlfriends!
The sidekick should be used to show why the hero does what he does, but he should also be used to plumb the depths of your world by occasionally getting away from the hero. The sidekick should be something that you have fun with; if you can't, then don't bother having one...