Solar-powered EV charging stations offer a sustainable and reliable alternative to traditional charging infrastructure, significantly alleviating stress on legacy grid systems. However, the intermittent nature of renewable energy sources poses a challenge for energy management in power distribution networks. To address this, optimal charge/discharge scheduling of EVs becomes crucial. This paper introduces an innovative Opposition-based Competitive Swarm Optimization (OCSO) technique to minimize the total charging cost of EVs in the IEEE 33-bus distribution system. Five strategically placed solar-powered charging stations on distinct buses are evaluated under three charging modes: dumb charging, smart grid-to-vehicle (G2V) charging, and smart vehicle-to-grid (V2G) charging. Comprehensive analyses are performed on critical parameters, including bus voltage stability, EV charging load profiles, electricity cost profiles, state-of-charge (SOC) dynamics, and the thermal performance of distribution transformers. Notably, total power losses are reduced by 13.7% and 21.6% in smart G2V and smart V2G modes, respectively, compared to dumb charging. Furthermore, the cumulative ageing factor of distribution transformers under smart V2G charging is reduced by 11.86%, indicating extended transformer lifespan. These findings demonstrate that solar-powered EV charging stations, coupled with advanced energy management strategies, can effectively mitigate grid impacts, enhance operational efficiency, and contribute to reducing net carbon emissions.