It can be migraine.
Migraine triggers can be-
sunlight exposure, bright light, loud sound, stress/tension, lack of sleep, change
in daily routine, irregular timing of meals.
Food like coffee, chocolates, ice cream.
Avoiding these triggers will help you a lot in preventing migraine.
Also, drink lots of water regularly.
Have lots of salad and fruit in your regular
Get your eyes checked too.
There are good medicines available for prevention as well as for an acute attack.