Mostly through excess rather than through anything inherent.
Marathon sessions of eight hours or more will leave your eyes strained and dry, and the tiredness that follows affects concentration well after you stop playing. There's a separate, specific risk for people with photosensitive epilepsy, who need to take flashing effects seriously.
Keeping sessions in the one-to-four hour range, with breaks and a sensible distance from the screen, avoids nearly all of it. The games aren't the hazard; the unbroken hours are.