Well, for your situation, there are some possibilities. First, you should know that Grand Papillary Conjunctivitis which is a very common type of eye infection may occur. 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. Of course, strain in the muscles that surround the eyelids can lead to the hurt of your eyes. Anyway, I will suggest you go and see the eye doctor, and he can give some advices.
When you feel the edge of the eye hurts, your eyes may get the infection or inflammation. You'd better use the eye drops with anti-inflammation to release the symptom. You'd better go to see the doctor and have a check on the eyes to see whether there is the infection or the broken corneal in your eyes. Then you could accept the treatment.
Well, it seems that there are some problems with your eyes. So, as far as I know, there are many causes for painful eyes, and what is important for you is to figure out what precisely led to that feeling. Typically, eye strain, red eyes, pink eyes could result in pains. But there might be other causes, so , I recommend that you go to visit a doctor and see what happened to your eyes.