As a photoelectric functional material, ZnO exhibits great potential in energy and environmental applications, which are currently the major issues confronting human society. The photoelectric properties of ZnO are closely related to its structure. We therefore first give a brief introduction to the preparation and structure of ZnO. Next, we discuss the defects present in ZnO nanomaterials and the influence of doping on their properties. We then give a detailed discussion about their applications, with special mention of photoluminescence and solar cells. We envision that the research and development of ZnO nanomaterials may help to achieve the sustainable development of energy and protection of the environment.