This could very well be a need for glasses. If you already got glasses maybe your prescription is wrong.
Futhermore, try to notice if this happens when you have been doing specific things.
For example, you could have been doing close-up work the last couple of hours, and this causes eye strain if your prescription is off.
It could also be distance viewing, it can be the lighting, and it doesn't have to do with the eyes, it can also be the way you sit (body-position).
I have suffered from very bad headaces every day from I was 10 up till 15 years old, because I used a lot of time in front of my computer i bad positions.
If you have to sit a long time on a chair, remember to change position very often.