squinting
To squint is to close your eyes partially so that you can see better. When you squint, you get a little bit of a headache because you're not using your full range of vision.
He was squinting so that he could see better in the dark.
She was squinting because the light was too bright.