When I press a finger on a closed eye lid it means the eye lid touches eye ball, then I didn't feel any pain.
Now I open my eye lid, then I small touch(not press) the eye ball, it gives me pain, why so?
TL;DR: It's psychological.
Pain is a tricky thing, and it's certainly possible to feel pain when pressing your eyelids against your eyeballs if you press hard enough ("hard enough" in this context is generally quite a lot less hard than is required to cause damage, by the way).
However: Since your eyeballs don't have skin, they also don't have nociception; i.e. they don't have pain receptors in the same way your skin at large does. Eye pains, like headaches, are largely caused by a combination of psychological responses to perceived stimuli and pain responses in associated structures.
Basically, the pain you experience when fingering your eye isn't pain in the same sense as the pain you feel from touching a hot stove or pricking yourself with a needle, it's generated by the brain in response to novel stimulus. Your brain knows what eyelids feel like, and it's okay with them, but once you start introducing fingers into the mix, all sorts of disturbances in salinity and moisture crop up, and your brain freaks out (and rightly so).
The same phenomenon can be seen with regards to swimming in the ocean: If you try to open your eyes under water, you'll find it a painful and disconcerting experience, but if you keep at it and practice holding your eyes open under water, you'll get used to it, and the pain will go away. Similarly, contact lens wearers will soon learn to deal with these stimuli, and be able to handle eye touching.
While I wouldn't advise you to go pawing at your eyeballs, if you for whatever reason have a need to do so, acclimating yourself to the feel of it will make the associated pain go away in short order.
I think what you feel when you touch your eyeball directly is not pain as such, but you feel the uncomfortable sensation of dryness as your fingers dry out your eyeball. Your eyelids job is to continually keep the eyes moistened, and as their underside contains lacrimal fluid, you don't feel any discomfort.
This probably isn't advisable to try, but if you lick your finger first you can touch your eyeball directly without it hurting. It would appear to be that a lack of lubrication causes the painful sensation possibly along with dirt on the skin. Someone else may have a more scientific answer.