One main reason that can explain your situation is that your eyes are in lack of water. You must have worked in front of computers too long everyday. Or you may have the strong stress these days. However, if you have the pink eyes, you eyes will also feel sore when closing eyes. Thus, you'd better go to the hospital and have a look.
The reason why your eye will feel painful and sore may be that you often have put your eyes under the strains. Once you stop to have a rest, your eyes couldn't adapt to it. You may in such situation when you close your eyes. Therefore, you'd better guarantee an enough sleeping and increase the times of going outside for an exercise. Besides, never see things frequently under the strong lights. Or your eye couldn't bear on it.
According to your symptom, you may have developed keratitis. There are three common clinical keratitis. The first is caused by bacterial infection; you need the treatment of antibacterial eye drops. The second is caused by viral infection, you should use the anti-viral drugs; the third is caused by fungal infections, you can select the antifungal drug. If the illness is going to be seriously dilated, then you must have the subconjunctival injection as well as systemic therapy and oral, intramuscular, intravenous antibiotic, anti-viral, anti-fungal drugs.
For your situation, I can say that you feel sore in your eyes because you are too tired. As we know that just like doing 100 push-ups can cause the arm muscles to become painful, so can the eyes. We can describe this as sore eyes. So if you want to relieve the symptom, I suggest you should have some rest. For example, after you have learned or read books for a long time, you'd better go out and see something green, besides, you can also drink some tea or eat some food which can do a good job to your sore eyes.