We have investigated the structural properties, optical absorption, and PEC responses for ZnO nanostructures. All the films were deposited on fluorine doped tin oxide coated glass. We found that the presence of N2 in the growth ambient help to promote the formation of aligned nanorods at high substrate temperature of 500°C, resulting in the significantly enhanced PEC response, compared to ZnO(Ar) films deposited in pure Ar gas ambient. A porous ZnO nanocoral structure synthesized using two step process provides a large surface area, superior light trapping, and an excellent pathway for carrier transport, resulted in a significantly increased PEC response compared to the compact ZnO thin films. Our results suggest that synthesis method can be used to produce desired properties of thin films and nanostructures may help to improve PEC performance.