The paper presents a predictive control method for the water distribution networks (WDNs) powered by photovoltaics (PVs) and the electrical grid. This builds on the controller introduced in a previous study and is designed to reduce the economic costs associated with operating the WDN. To account for the uncertainty of the system, the problem is solved in a scenario optimization framework, where multiple scenarios are sampled from the uncertain variables related to PV power production. To accomplish this, a day-ahead PV power prediction method with a stochastic model is employed. The method is tested on a high-fidelity model of a WDN of a Danish town and the results demonstrate a substantial reduction in electrical costs through the integration of PVs, with PVs supplying 66.95% of the required energy. The study also compares the effectiveness of the stochastic optimization method with a deterministic optimization approach.