Light sensitivity is a symptom that can have a number of different causes.
Many things that disturb the surface of the eye, such as significant dryness or a corneal abrasion, can make oneself more sensitive to light than usual.
Problems not directly associated with the eye can also cause light sensitivity. These include migraines, and even severe infections like meningitis.
If someone has a history of intermittent episodes of light sensitivity associated with headache and possible nausea, sometimes with short-lived visual disturbances of 15-20 minutes, with complete resolution of the symptoms in between attacks/episodes, it may be migraine. But this is a 'diagnosis of exclusion', so other possible causes need to be ruled out in a proper clinic consultation first.
As noted above, there are many possible causes of this symptom, and you should consult a doctor who can obtain a full history and perform a thorough examination, before arriving at a proper diagnosis.
Disclaimer: This answer is not a substitute for a proper, comprehensive clinic consultation and is intended for general educational purposes only.