In this work, undoped ZnO and ZnO:Ag nanostructures were produced using spray pyrolysis (SP). X-ray diffraction (XRD) indicated that the predominant peak was (101). The grain size of pure ZnO increased from 15.18 nm to 18.03 nm with doping, while strain decreased from 2.28 to 1.92. Atomic force microscopy (AFM) images provided detailed surface topography information, revealing a reduction in root-mean-square roughness values from 6.86 nm for pure ZnO to 5.13 nm and 3.36 nm for ZnO:1% Ag and ZnO:3% Ag, respectively. The AFM images also identified particle sizes ranging from 80.96 nm for ZnO to 58.23 nm for ZnO:3% Ag. Scanning electron microscopy (SEM) images of Ag-doped ZnO films showed enhanced grain growth, indicating an improved crystalline structure. In all cases, the samples exhibited optical transmittance exceeding 90%, and the energy bandgap narrowed from 3.35 eV to 3.25 eV upon Ag introduction, as evidenced by ultraviolet–visible (UV-Vis) spectra. Furthermore, the absorption coefficient and refractive index decreased as a consequence of Ag content. The variation in the Ag-doping ratios on ZnO nanostructures led to an enhancement in conversion efficiency from 0.787% to 1.004%, depending on the crystallite size. This indicates that both undoped and Ag-doped ZnO nanostructures exhibit high efficiency, making them suitable for use in sustainable dye-sensitized solar cells.