Allergies can start after years of exposure to something. Indeed some allergies really only start that way, as in the case of the one that lead to my wife having migraines.
But there can be a ton of things that lead to migraines.
In general to avoid light-based triggers you may find the following helpful (or not, as you may have a very different situation than other people) :
1) If you're going to be looking at something bright, try to have good ambient lighting. Looking at a bright monitor in a dark room would probably not be a great idea.
2) You may find that bright lights per se are not a problem, but that rapid variations in lighting (strobing, flickering, etc) are. Emergency lights on police/ambulance/etc vehicles can be particularly problematic, as can lightning flashes.
3) Take breaks
Playing for hours on end may be tempting, but ultimately detrimental.
In my wife's case it got
really bad partly because she didn't want to adjust her lifestyle to deal with the new risk factors, and couldn't game for months. It was kind of sad, given what I do for a living. If it gets bad it can be hard to get it un-bad, you could say. Once she started being careful to avoid stuff like that she got back to being able to game occasionally, and longer for games that were less trigger-ish (no around-the-screen glows, lightning, etc). Once we got away from the source of the main allergies she's gotten to the point where she can basically play according to her old habits (just avoiding the really flashy games).
Anyway, all the above is based off of a very very small statistical sample, you could say, but perhaps it will help