Is it possible to produce electricity from all wavelengths of electromagnetic spectrum beside visible light ?Like using gamma rays or x-rays .
No, this is not possible with current (and feasible) technology. There are cutoffs at both low and high energies which make collecting energy difficult.
This leaves infrared, optical, and near UV light -- all of which are currently used in solar energy production.
As @CrazyBuddy points out, these are also the only bands which contain significant energy as the peak of the solar spectrum is in the optical (and the atmosphere absorbs lots of energy far outside the optical).
Currently, we're using EM waves in the visible & UV region of spectrum because, it's freely available via solar radiation. Yes, we can. But, the photoelectric current depends only on the intensity of incident radiation, irrespective of frequency provided the frequency is above the threshold frequency.
Because, current depends only on the rate of flow of electrons. Hence - the higher the intensity (more photons), more electrons are knocked off. If you're increasing the frequency, the electrons have more kinetic energy.
But, there isn't a source for X & $\gamma$-rays. It's quite expensive and potentially hazardous too...
This is in addition to the high & low energies zhermes mentioned.
At radio frequencies we can extract energy from the radiation with a tuned circuit and a rectifier. Think of a crystal radio set: it extracts enough energy from the transmitted signal to produce sound in a headphone.
It has been suggested this could be used to beam energy down to earth from a solar power satellite. See for example this Wikipedia article.