The power systems of today seem inseparable from clean energy sources such as wind turbines (WTs) and photovoltaics (PVs). However, due to their uncertain nature, operational challenges are expected when WT and PV energy is added to the electricity network. It is necessary to introduce new technologies to compensate for the intermittent nature of renewable energy sources (RESs). Therefore, rationally implementing a demand response (DR) program with energy storage systems (ESSs) in a virtual power plant (VPP) environment is recommended as a way forward to minimize the volatile nature of RESs and improve power system reliability. Our proposed approach aims to maximize social welfare (SW) (i.e., maximization of consumer benefits while minimizing energy costs). Our method assesses the impact of the DR program on SW maximization. Two scenarios are examined, one with and one without a DR program. Stochastic programming theory is used to address the optimization problem. The uncertain behavior of WTs, PVs, and load demand is modeled using a scenario-based approach. The correctness of the proposed approach is demonstrated on a 16-bus UK generic distribution system. Our results show that SW and active power dispatch capacity of WT, PV, and ESS are fairly increased using the proposed approach.