Yes, you may absolutely use a strong and powerful Lydia for the entire game. I'll explain below.
As mentioned in the other answers here, the game locks followers around the level you are when you acquire them. Because of Lydia's typically early acquisition in the game, she is leveled extremely low and will become useless if nothing is done while you become stronger.
EDIT: As of patch 1.6 this problem has been fixed. However I am not positive if the fix affects current saves, so this solution may still need to be used for your currently under-leveled followers from games started pre-1.6
The Wabbajack - A staff granted for completing the Daedric Quest: The Mind of Madness
The quest is extremely easy and doable at any level. You must have access to Solitude. I'll let you do your own research on the quest itself. To the point:
- Important: Release Lydia from your service first.
- Use the Wabbajack on Lydia until she morphs into a another creature: A goat, bunny, daedra, whatever. It's important that she morphs.
- Use the Wabbajack again to morph her back. If she returns wearing her default armor, the attempt has been successful and she will be re-leveled to your current level.
- Re-hire Lydia as your follower.
Why? The act of morphing her to another creature, and then morphing her back resets her stats to your level. Yay.
- Defintely quick save or save before attempting to use Wabbajack on Lydia. The wabbajack is random and has many effects including Instant Death.
- Take any rare items from her before the transformation attempt, as she sometimes loses them on her return to a human state
That's it. I've put in over 200 hours in Skyrim and I've had Lydia the entire time. Currently on Master @ level 55 and Lydia is basically her own demi-god. Have fun.