Rainwater Harvesting (RWH) is increasingly recognized as a vital sustainable practice in urban environments, aimed at enhancing water conservation and reducing energy consumption. This study introduces an innovative integration of nano-composite materials as Silver Nanoparticles (AgNPs) into RWH systems to elevate water treatment efficiency and assess the resulting environmental and energy-saving benefits. Utilizing a regression analysis approach with Support Vector Machines (SVM) and K-Nearest Neighbors (KNN), this study will reach the study objective. In this study, the inputs are building attributes, environmental parameters, sociodemographic factors, and the algorithms SVM and KNN. At the same time, the outputs are predicted energy consumption, visual comfort outcomes, ROC-AUC values, and Kappa Indices. The integration of AgNPs into RWH systems demonstrated substantial environmental and operational benefits, achieving a 57% reduction in microbial content and 20% reductions in both chemical usage and energy consumption. These improvements highlight the potential of AgNPs to enhance water safety and reduce the environmental impact of traditional water treatments, making them a viable alternative for sustainable water management. Additionally, the use of a hybrid SVM-KNN model effectively predicted building energy usage and visual comfort, with high accuracy and precision, underscoring its utility in optimizing urban building environments for sustainability and comfort.