Community drinking water sources are increasingly contaminated by various point and non-point sources, with emerging organic contaminants and microbial strains posing health risks and disrupting ecosystems. This study explores the use of zinc oxide nanoparticles (ZnO-NPs) as a non-specific agent to address groundwater contamination and combat microbial resistance effectively. The ZnO-NPs were synthesized via a green chemistry approach, employing a sol-gel method with lemon peel aqueous extract. The catalyst was characterized using techniques including XRD, ATR-FTIR, SEM-EDAX, UV-DRS, BET, and Raman spectroscopy. ZnO-NPs were then tested for photodegradation of quinoline yellow dye (QY) under sunlight irradiation, as well as for their antibacterial and antioxidant properties. The ZnO-NP photocatalyst showed significant photoactivity, attributed to effective separation of photogenerated charge carriers. The efficiency of sunlight dye photodegradation was influenced by catalyst dosage (0.1–0.6 mg L−1), pH (3–11), and initial QY concentration (10–50 mg L−1). The study developed a first-order kinetic model for ZnO-NPs using the Langmuir–Hinshelwood equation, yielding kinetic constants of equilibrium adsorption and photodegradation of Kc = 6.632 × 10−2 L mg−1 and kH = 7.104 × 10−2 mg L−1 min−1, respectively. The results showed that ZnO-NPs were effective against Gram-positive bacterial strains and showed moderate antioxidant activity, suggesting their potential in wastewater disinfection to achieve sustainable development goals. A potential antibacterial mechanism of ZnO-NPs involving interactions with microbial cells is proposed. Additionally, Gaussian Process Regression (GPR) combined with an improved Lévy flight distribution (FDB-LFD) algorithm was used to model QY photodegradation by ZnO-NPs. The ARD-Exponential kernel function provided high accuracy, validated through residue analysis. Finally, an innovative MATLAB-based application was developed to integrate the GPR_FDB-LFD model and FDB-LFD algorithm, streamlining optimization for precise photodegradation rate predictions. The results obtained in this study show that the GPR and FDB-LFD approaches offer efficient and cost-effective methods for predicting dye photodegradation, saving both time and resources.