Undoped and doped zinc oxide in film form is used in a wide range of applications. Its electrical and optical properties depend on the oxide conditions during preparation, which are influenced by many deposition parameters. The aim of this work was to experimentally investigate the properties of films deposited under clearly defined oxygen-rich and oxygen-poor conditions. The observed property changes were then described based on theoretical assumptions about internal defects formed in ZnO under different oxygen conditions. To achieve the objective, the ZnO and ZnO:Al films were sputtered in a mixture of argon and oxygen to ensure oxygen-rich conditions. Oxygen-poor conditions were provided by co-sputtering from oxide and metal targets in argon. We have found that the growth in oxygen-rich conditions leads to approximately stoichiometric ZnO films and the films prepared under oxygen-poor conditions are strongly oxygen deficient. The resistivity of undoped ZnO films can be controlled from 108 to 10−2 Ωcm while maintaining high transparency in the visible spectrum. The high resistivity is caused by the formation of deep acceptors under oxygen-rich conditions. The high concentration of zinc interstitials is responsible for the low resistivity in oxygen poor conditions. Even in the case of ZnO:Al films, the carrier concentration is strongly reduced at oxygen-rich conditions by the deep acceptors. These defects tend to relax during vacuum annealing at 300 °C due to self-diffusion. The carrier mobility is mainly related to the crystallinity. The formation of a high number of basal edge dislocations has been identified as a reason for the reduction in transmittance.