Strictly speaking beaming across light years was introduced in TOS, but it was alien technology and a capability the Federation and other known races didn't have.
"Gamesters Of Triskelion" - The Providers beam Kirk, Uhura and Chekov from one star system to another to abduct them.
"Assignment: Earth" - Gary Seven is intecepted while beaming to Earth from an unknown planet light years away.
"That Which Survives" - The Enterprise itself is beamed over 900 light years from one location to another.
"Gamesters Of Triskelion" - The Providers beam Kirk, Uhura and Chekov from one star system to another to abduct them.
"Assignment: Earth" - Gary Seven is intecepted while beaming to Earth from an unknown planet light years away.
"That Which Survives" - The Enterprise itself is beamed over 900 light years from one location to another.