The topic related to affordable and clean energy is currently highly actual. It is essential to realize that affordable and clean energy is energy without negative effects on the environment. Its advantage is that a lot of clean energy is renewable. Therefore, this type of energy contributes positively to the development of several spheres in the economy, such as agriculture, trade, communications, education, health and transport. The aim of the study is to analyze changes in the development of sustainable indicators set of affordable and clean energy in relation to Sustainable Development Goal 7 in the European Union, using cluster analysis to identify the differences and compare changes in the grouping of countries into clusters in the two years studied (2010, 2020). In addition to categorizing countries and confirming differences among member states of the European Union, the results allow us to evaluate the contribution of selected indicators to achieving affordable and clean energy. Our findings indicate that primary energy consumption per capita, final energy consumption in households per capita, energy productivity, share of renewable energy in gross final energy consumption and population unable to keep their home adequately warm shows a positive trend and supports the achievement of the Sustainable Development Goal 7.the energy import dependency is a problematic area in several countries. The results of cluster analysis showed that the largest shifts within the clusters were recorded in Italy, Estonia, and Luxembourg. The most positive shift occurred in Italy due to a significant improvement in four indicators. Luxembourg as a solo country cluster showed in 2020 some of the worst results due to the highest primary energy consumption per capita and the lowest share of renewable energy in gross final energy consumption. The dynamics of Estonia within the clusters was marked by the lowest value of the indicator of dependence on energy imports, as well as an increase in the share of renewable energy and insufficient energy productivity. The results of our study also confirm, that Sweden and Finland are leader countries, which despite high energy consumption are applying renewable energy sources to a greater extent by which they make a positive movement toward affordable and clean energy.