The emphasis and focus on energy transition towards a renewable energy-based energy system has increased, alongside the need to understand the economic feasibility of energy system development built around adaptation and implementation of renewable energy resources and smart technologies to a pre-existing energy system. Likewise comes the importance of evaluating and understanding the positive social and environmental impact obtained through energy transition towards a greener and cleaner energy system. This paper applies the cost-benefit analysis method to assess the economic feasibility of implementing renewable energy resources and smart energy technologies in a pre-existing energy system in two pilot sites (St-Jean, France and Barcelona, Spain). The evaluation process encompasses all relevant parameters such as investment, operating and maintenance costs, energy prices, energy demand, energy supply and energy technologies characteristics needed to carry out an economic feasibility assessment of investments and implementation projects. In addition, the evaluation process allows assessing the environmental benefits obtained through implementation by calculating the estimated emission reduction achieved through energy system retrofitting and transition, alongside identifying the society's economic gains attained from the emission reduction. The results show that investing in energy transition and system development toward renewable energy-based energy systems is economically viable since the analysis highlights a considerable low payback period with 8.2 years for the Barcelona pilot, and 2.8 years for St. Jean pilot. Likewise provides significant economic benefits to energy system operators and stakeholders, which is demonstrated with a 22% increase in revenue in the case of the St. Jean pilot and 4% decrease in overall costs at the Barcelona Pilot. The results highlight that energy transition offers various other benefits, such as increasing energy system flexibility with the St Jean pilot experiencing a 21% average increase in energy flexibility in the system through implementation of the energy system development. Also, this includes other benefits such as emission reduction of 23.5% for St. Jean pilot and 4% for the Barcelona pilot, which can help improve public health.