It can be caused by a sinus infection or tension or cluster headaches. If you suffer an infection in the sinus cavity, in the course of the immune response against the infection, the sinuses get inflamed and produce pain and pressure to the eyebrows and the upper cheeks. Therefore, you feel the top part of your eyes is hurt. Under such circumstances, you can use antibiotics and pain killers to treat it. If you suffer from tension headaches, you should have a good sleep and relax yourself. If you have cluster headaches, you should be treated with prescription pain-killing medications. In addition to above common causes, acute closed angle glaucoma and temporal arteritis can cause pain on the top part of your eyes. I advise you to go to hospital for an thorough examination. Wish you feel better soon.