We report that the visible photoluminescence from ZnO nanoparticles can be controlled by changing the ionic or polar nature of the medium in which the nanoparticles are dispersed. We find that the presence of sufficient amount of electrolyte can even quench the emission. An explanation is proposed based on the surface charge of the ZnO nanoparticles, which controls the band bending in the depletion layer at the surface. The band bending in turn, decides the predominant nature of the visible emission. The explanation is validated by establishing a direct correlation between the visible emission and the zeta potential. (C) 2008 American Institute of Physics.