From what you said, I can see that there is something wrong with your eyes. And as a matter of fact, there are a lot of causes that could lead to painful eyes. So, it could be seen as a sign of health problem. So here I advise you to take an eye exam so that you could know what happened to your eyes, and thus you could better take measures to tackle this problem. Good luck.
Your unhealthy body problem may cause the hurt of your back of the eyes. Or you may have the knock at the head which causes your hurt of the eyes. You should have the good rest for the eyes by keeping the good habit of hygiene and diet. You should go to see the doctor and check on the eyes.
Well, generally speaking, it is difficult to say what the real cause is, for there are some possibilities. In common, it can be because of Grand Papillary Conjunctivitis which is a very common type of eye infection may occur. When it occurs, it can just make the back of your eyes hurt. And in this situation, it can be dangerous, for it is very easy to transfer this infection from one eye to the other with your fingers so that's why the other one may have started hurting. By the way, strain in the muscles that surround the eyelids can lead to the hurt of your eyes too. So there are many reasons which can be the causes. Anyway, I will suggest you go and see the eye doctor, and he can give some advices.