The reliable operation of a power system requires a real-time balance between supply and demand. However, it is difficult to achieve this balance solely by relying on supply-side regulation. Therefore, it is necessary to cooperate with effective demand-side management, which is a key strategy within smart grid systems, encouraging end-users to actively engage and optimize their electricity usage. This paper proposes a novel bi-level optimization model for integrating solar, hydrogen, and battery storage systems with charging stations (SHS-EVCSs) to maximize social welfare. The first level employs a non-cooperative game theory model for each individual EVCS to minimize capital and operational costs. The second level uses a cooperative game framework with an internal management system to optimize energy transactions among multiple EVCSs while considering EV owners’ economic interests. A Markov decision process models uncertainties in EV charging times, and Monte Carlo simulations predict charging demand. Real-time electricity pricing based on the dual theory enables demand-side management strategies like peak shaving and valley filling. Case studies demonstrate the model’s effectiveness in reducing peak loads, balancing energy utilization, and enhancing overall system efficiency and sustainability through optimized renewable integration, energy storage, EV charging coordination, social welfare maximization, and cost minimization. The proposed approach offers a promising pathway toward sustainable energy infrastructure by harmonizing renewable sources, storage technologies, EV charging demands, and societal benefits.