If you have pain in your eye and you don't know the reason then you should avoid it. As eye is one of the sensitive areas of the body it should not be neglected.
There can be many reasons for pain in eyes as if can be any infection, syndrome or anything. So, it would be better if you go and consult an eye specialist.