Can I write histogram equalization, blurring, sharpening grayscale image etc.. as shader programs with openGL?
Yes you can. There are basically two approaches:

You draw everything to a framebuffer object. Then you apply image processing fragment shaders to resulting texture of the previous draw call, where the shaders take the pervious texture with a sampler.

or if you have a particular image and you would like to have more control on the numeric precision, the number of neighbours available to you while working on pixel etc:

You apply compute shaders directly to image.

For the first approach, see Learn OpenGL, for compute shaders, see Anton's tutorial