ZnO thin films are synthesized by an ultrasonic spray pyrolysis method, with the deposition temperature in a range between 250–450 °C. The obtained thin films are analyzed by X‐ray diffraction (XRD), atomic force microscopy (AFM), and photoluminescence (PL). The samples are used in a photocatalytic experiment to compare the degradation efficiency by methylene blue decomposition under UV irradiation. XRD patterns confirm a polycristalline wurtzite structure with preferred orientation along the (002) plane. AFM images reveal an important change in the shape and size of the grains constituting the surface. The roughness values are in the range of 17–93 nm. Thickness values of thin films deposited at 250, 350, and 450 °C are ≈0.9, 2.3, and 1.4 µ, respectively. From PL characterization, the spectra are found to be sensitive to the deposition temperature, where emission peaks with different forms and intensities are observed. One peak at 389 nm is attributed to the recombination of free excitons, and other peaks between 403–522 nm correspond to violet, blue, and green emissions indicating the presence of Zn vacancies, Zn interstitials, and oxygen vacancies, respectively, in the ZnO structure. The photocatlytic results show that the best photocatalytic efficiency of 88% is achieved by ZnO thin film deposited at 450 °C.