With the use of pomegranate (Punica granatum) peel extract in the present study, a safe and affordable method of biosynthesizing Ag–ZnO nanocomposites has been developed that follows all green chemistry principles. Different analytical techniques, including X-ray diffraction (XRD), Scanning Electron Microscopy (SEM), Transmission Electron Microscopy (TEM), Energy Dispersive X-Ray (EDX), UV–Vis spectroscopy, and Fourier Transform Infrared (FTIR) Spectroscopy, were utilized to identify the unique properties of synthesized nanocomposites. Based on the characterization results, these nanocomposites have a spherical shape with dimensions ranging from 40 to 77 nm and a wurtzite structure with hexagonal facets. Considering the upcoming water crises and the importance of treating water contaminated with industrial and organic dyes, this study investigates how biosynthesized nanocomposites using ultraviolet lamps and sunlight can be used to remove one of the most common organic dyes, methylene blue. In order to identify the most optimal conditions for removing methylene blue from polluted water, this study used two light sources, different nanocatalyst concentrations, and various pH value ranging from 2 to 10. When the ideal conditions for this reaction are met, the prepared nanocomposites can catalyze the pollutant dye within 14 and 50 min, when exposed to ultraviolet light and sunlight. In this study, it was determined that plant wastes are biogenic sources capable of providing active ingredients (AI) for the biosynthesis of metal nanocomposites for applications such as decomposition and degradation of organic dyes.