With 100% confidence, yes.
About two months ago, I finally downloaded TCG Live after stockpiling code cards.
I had code cards from base Sun & Moon. Got hundreds of cards, downloaded TCG pocket a day later, haven't played TCG Live since. Wasted 2 hours of my life. :( But at least I get to answer this. I will say, some event specific or promotional ones, such as Pokemon GO, do have expiration dates, so look out for those. Very old sets (Like base Sun & Moon) may just auto-redeem to currency, but they should still work if they can be read properly.
As to whether they are worth it to give it out or not, that's another story. You should ask if they have TCG Live, and if they do, THEN ask if they want them. They typically don't give out anything good, but they are in every pack, and if you are anything like me, you have hundreds upon hundreds of them, so yeah, why not?
Hope this was helpful.
Sources:
https://support.pokemon.com/hc/en-us/articles/6488400519444-Code-Card-Redemption-FAQ
My own experience.