Machine learning (ML) plays an essential role in various scientific fields. ML streamlines renewable energy systems, boosting efficiency and production, as global adoption necessitates precise forecasts for sustainable energy generation. Machine learning applications help make more accurate estimates than traditional models. This article reviews supervised and unsupervised machine learning methods for the variable renewable energy (VRE) sector. VRE sources produce energy intermittently instead of on-demand, such as solar, wind, and hydropower energy sources. ML applications analysis includes energy forecasting, insulation forecasting, wind turbine monitoring, and energy price forecasting. This systematic review provides a comprehensive overview of the latest machine learning methods and their applications in the variable renewable energy sector, offering insights into the most promising approaches for accurate and efficient energy forecasting. In this review, we compared different performance indicators such as root mean square error, mean absolute error, mean absolute percentage error, normalized mean square error, and R-squared. This review uniquely analyzes and compares ML techniques applied to forecasting and optimization across the VRE sector, identifying the most promising methods. We hope our review will stimulate further research efforts to improve the accuracy and reliability of renewable energy forecasting models.