With population increases and a vital need for energy, energy systems play an important and decisive role in all of the sectors of society. To accelerate the process and improve the methods of responding to this increase in energy demand, the use of models and algorithms based on artificial intelligence has become common and mandatory. In the present study, a comprehensive and detailed study has been conducted on the methods and applications of Machine Learning (ML) and Deep Learning (DL), which are the newest and most practical models based on Artificial Intelligence (AI) for use in energy systems. It should be noted that due to the development of DL algorithms, which are usually more accurate and less error, the use of these algorithms increases the ability of the model to solve complex problems in this field. In this article, we have tried to examine DL algorithms that are very powerful in problem solving but have received less attention in other studies, such as RNN, ANFIS, RBN, DBN, WNN, and so on. This research uses knowledge discovery in research databases to understand ML and DL applications in energy systems’ current status and future. Subsequently, the critical areas and research gaps are identified. In addition, this study covers the most common and efficient applications used in this field; optimization, forecasting, fault detection, and other applications of energy systems are investigated. Attempts have also been made to cover most of the algorithms and their evaluation metrics, including not only algorithms that are more important, but also newer ones that have received less attention.