The Night Begins to Shine
I don't see a problem in using them. I looked over the text from both and seems the older rainbow energy has the same applied effect just worded differently. Good question though, and probably a good idea to ask your local card shop or a tournament just bring extra rainbow energys from xy and up in case.
As of last year, only cards that are functionally identical or have received a minor errata are legal in sanctioned play. Unfortunately Rainbow Energy has received a major errata since its original print in Team Rocket, and that print of the card is no longer legal. The oldest print of Rainbow Energer that is legal for Standard play is from Aquapolis. The major difference is that you now put one damage counter on the Pokemon you attach Rainbow Energy to rather than doing 10 damage. Although the outcome is the same, they interact with other game mechanics differently, so this was deemed a major errata.
For reference, you can find a list of older cards legal in the Standard format here.