It must be because you have eye strain or damaged eye muscles.
Most likely, you may be suffering from eye strain. In this case, you don't need to stop doing so. Eye exercise actually help your eyes to relax and feel better, though it may hurt when you doing it. In this case, you should also drip some eye drops to relieve eye strain or have a rest by looking in distance.
What can be worse is that you have something wrong with your eye muscles. Were you punched in the eye lately? Physical trauma is possible to cause eye muscle damage. Nervous disorder can also give rise to this pain. Therefore, if the pain doesn't go away after two days, you need to have your eyes examined by the doctor.
I can see that you have got some problems with your eyes. The pain of your eyeballs might be resulted from excessive use of your eyes, or a lack of sleep, sometimes headaches could also make it happen. In the meantime, some serious problems might give rise to it. So, if the problem constantly exist, you'd better visit an eye doctor in the neighborhood.
Actually the eye exercise is really good for eyes. However your eyes may get hurt from the eyes infection which you need to have a full check on the eyes. You may have the eye infection because of coming invisible bacterium. You need to use some eye drops with anti-inflammation to release the eyes. You could also use the warm compress to make your eyes feel better.