First, as others have said, if you're experiencing pain, get your eyes checked. More typical signs of fatigue or eye strain are more of a tired burning feeling from dry eyes (not blinking enough), or difficulty focusing, but shouldn't involve any pain. Pain should be checked out.
Beyond that, a few other things to consider to make it easier to spend more time on the computer if you need to do so, again, room lighting and monitor brightness and contrast settings. Too much room lighting will put a glare on the screen, and too little will make the screen seem too bright. The location of room lighting can be an issue too. Sometimes the brightness level is fine, but the bulbs are too close to where your monitor is and reflect into it, while moving the same brightness bulbs to a lamp a little to the side or across the room would be perfectly comfortable. Also, the position of your monitor is important.
Here's a site that gives tips on how to position your monitor to minimize eyestrain and neck strain.
http://www.healthycomputing.com/office/setup/monitor/ I like this one because it also gives useful exceptions.
One of the things I see done wrong most often is putting the monitor too high as people try to raise them up on shelves on the desk to give them room to put other things under it on the desk, and then you're constantly straining your neck up to look at it (and often, you just don't have much of a choice with a lot of desks in terms of height, but if it's really a problem for someone, they make computer desks with a recessed area for the base of the monitor to sit a bit lower than the rest of the desk surface to help with this).