In the last decade, many artificial intelligence (AI) techniques have been used to solve various problems in sustainable energy (SE). Consequently, an increasing volume of research has been devoted to this topic, making it difficult for researchers to keep abreast of its developments. This paper analyzes 18,715 articles—about AI techniques used for SE—indexed in Scopus and published from 2013 to 2022, which were retrieved and selected following a novel iterative methodology. Besides calculating basic bibliometric indicators, we used clustering techniques and a co-occurrence analysis of author keywords to discover and characterize dominant themes in the literature. As a result, we found eight dominant themes in SE (solar energy, smart grids and microgrids, fuel cells, hydrogen, electric vehicles, biofuels, wind energy, and energy planning) and nine dominant techniques in AI (genetic algorithms, support vector machines, particle swarm optimization, differential evolution, classical neural networks, fuzzy logic controllers, reinforcement learning, deep learning, and multi-objective optimization). Each dominant theme is discussed in detail, highlighting the most relevant work and contributions. Finally, we identified the AI techniques most widely used in each SE area to solve its specific problems.