Crystal structure and electronic properties of SnO2 doped with non-metal elements (F, S, C, B, and N) were studied using first-principles calculations. The theoretical results show that doping of non-metal elements cannot change the structure of SnO2 but result in a slight expansion of the lattice volume. The most obvious finding from the analysis is that F-doped SnO2 has the lowest defect binding energy. The doping with B and S introduced additional defect energy levels within the forbidden bandgap, which improved the crystal conductivity. The Fermi level shifts up due to the doping with B, F, and S, while the Fermi level of SnO2 doped with C or N has crossed the impurity level. The Fermi level of F-doped SnO2 is inside the conduction band, and the doped crystal possesses metallicity. The optical properties of SnO2 crystals doped with non-metal elements were analyzed and calculated. The SnO2 crystal doped with F had the highest reflectivity in the infrared region, and the reflectance of the crystals doped with N, C, S, and B decreased sequentially. Based on this theoretical calculations, F-doped SnO2 is found to be the best photoelectric material for preparing low-emissivity coatings.