It is urgent to make a change of strategy that successfully faces the energy transition to achieve the 2030 sustainable development goals, the armed conflict in Europe, the high price of energy supply and the high energy dependence at European and national level. In this scenario, the energy community, as a new legal entity, driven by European regulations, can be considered an effective tool to fight against climate change, accelerating the energy transition and guaranteeing a fair and inclusive energy system so necessary in our country. At the national level, the legal framework that regulates energy communities is insufficient. Thus, is it necesary a legal, technical and financial development to promote the constitution of such entities. In this paper, we study their legal nature, proposing, within the framework of Social Economy organisations, the associations and cooperatives as suitable legal formula. They have similar characteristics, provide environmental, social and economic benefits for their members, under principles of voluntary, inclusive and democratic participation; in order to improve the quality of life of citizens; in short, to work on behalf of people and our planet.