The answer is a bit of both—and it comes down to your eyes.
It can be harmful depending on how dark the room is. If you're gaming at night with the TV as your only real light source (a clock or light under the door doesn't really count), then yes, it can strain your eyes. But if you have a desk lamp, fan light, or any other light on while you play, it's generally fine.
The best time to play is during the day, when natural light is easy on your eyes. And if your eyes ever start to hurt or water, take about a half-hour break.