Electronic band structure and optical properties of Cr-doped ZnO were studied using the density functional method within the generalized-gradient approximation. Three configurations with the substitution of Zn by one and two Cr atoms in different positions were considered. For the pure ZnO, the Fermi level locates at the valence band maximum, while it shifts to the conduction band and exhibits metal-like characteristic after Cr atoms are introduced into the ZnO supercell. The calculated optical properties indicate that the optical energy gap is increased after Cr doping. More importantly, strong absorption in the visible-light region is found, which originates from the intraband transition of the Cr 3d bands and the conduction bands. Our calculations provide electronic structure evidence that, in addition to usage as short-wavelength optoelectronic devices, the Cr-doped ZnO system could be a potential candidate for photoelectrochemical application due to the increase in its photocatalytic activity.