This study reports the green synthesis of silver nanoparticles (AgNPs) using Solanum lycopersicum var. cerasiforme (SLC) leaves extract as a natural reducing and stabilizing agent under direct sunlight for just only 3 min. The main objective was to develop a rapid, cost-effective, and environmentally friendly method to fabricate SLC-functionalized AgNPs (SLC-AgNPs) for dual applications: highly selective colorimetric detection of mercury ions (Hg2⁺) and photocatalytic degradation of methylene blue (MB) dye. The synthesized nanoparticles were characterized by UV–Vis, FTIR, XRD, SEM, EDX, and DLS, confirming their spherical shape (~ 38 nm), crystalline structure, and stable surface functionalization. The SLC-AgNPs exhibited exceptional selectivity for Hg2⁺ through a redox reaction mechanism, enabling colorimetric sensing with a low detection limit of 37.7 nM and a linear response range of 40–180 nM. Detection of Hg2⁺ in real river and tap water samples validated the sensor’s practical applicability, with recoveries above 85%. In addition to sensing, the SLC-AgNPs demonstrated significant photocatalytic efficiency, degrading 83.4% of MB dye within 80 min of sunlight exposure, following pseudo-first-order kinetics with an activation energy of 35.02 kJ/mol. This dual- functionality capability highlights the novelty of the green synthesized SLC-AgNPs as an eco-friendly nanomaterial that combines sensitive heavy metal detection with effective dye degradation. These findings suggest promising potential for SLC-AgNPs in sustainable environmental monitoring and wastewater treatment, bridging cost-efficiency with high-performance nanotechnology.