With accelerating climate change and rising global energy consumption, the application of artificial intelligence (AI) and machine learning (ML) has emerged as a crucial tool for enhancing energy efficiency and mitigating the impacts of climate change. However, their implementation has a dual character: on one hand, AI facilitates sustainable solutions, including energy optimization, renewable energy integration and carbon reduction; on the other hand, the training and operation of large language models (LLMs) entail significant energy consumption, potentially undermining carbon neutrality efforts. Key findings include an analysis of 237 scientific publications from 2010 to 2024, which highlights significant advancements and obstacles to AI adoption across sectors, such as construction, transportation, industry, energy and households. The review showed that interest in the use of AI and ML in energy efficiency has grown significantly: over 60% of the documents have been published in the last two years, with the topics of sustainable construction and climate change forecasting attracting the most interest. Most of the articles are published by researchers from China, India, the UK and the USA, (28–33 articles). This is more than twice the number of publications from researchers around the rest of the world; 58% of research is concentrated in three areas: engineering, computer science and energy. In conclusion, the review also identifies areas for further research aimed at minimizing the negative impacts of AI and maximizing its contribution to sustainable development, including the development of more energy-efficient AI architectures and new methods of energy management.