We report on first-principles study of the effect of Er concentration and intrinsic defects (VO and VZn) on the electronic structure and optical properties of Er-doped ZnO using the GGA + U method. The lattice constants and band gap of ZnO calculated in this work are in agreement with experimental values. The results showed that the band gap of Er-doped ZnO decreases with increasing Er concentration, while it increases with the presence of O or Zn vacancies. Furthermore, the existence of VO causes the formation of a deep donor level in the band gap. Er–ZnO + VZn is a degenerate p-type semiconductor, and shallow acceptor states are created near the Fermi level. The magnetic moment of doped ZnO increases and Er 4f electrons are responsible for the induced magnetic moments. The absorption coefficient enhances in the visible range in Er doped ZnO. In the Er–ZnO + VO model, both absorption and reflection are relatively enhanced in the visible range, leading to a decrease in light transmittance. Hence, the magneto-optoelectronic properties of ZnO could be improved by an optimal concentration of Er as well as with the presence of oxygen vacancies.