Yes. Think of it this way. For an old card to remain legal, it must have been reprinted and be an EXACT copy of the newer card.
If you were to buy "Overgrowth", the Grass/Water Base Set theme deck, you'll get 12 Water Energy in addition to the other cards.
Buy a Shadowquake theme deck (EX: Legend Maker) and you'll get 14 Water Energy in addition to other cards.
Same name... still legal.
Long story short: all basic Energy will stay legal until the end of time.
Oh, one more thing: This only applies to BASIC Energy cards. As for Special Energy, you can play them if a card in the current Modified format shares the EXACT name as an old version.
You can play the old versions (like Darkness Energy and Metal Energy), but you MUST play them according to the text on the most recent version of the card.
This goes for old Trainers, too (like Pokémon Reversal).