The transition to renewable energy requires innovations in new renewable energy sources, such as wind turbines and photovoltaic (PV) systems. Challenges arise in ensuring efficient and reliable performance in their operation and maintenance. Predictive maintenance using machine learning (PdM-ML) is relevant for addressing these challenges by enhancing failure predictions and reducing downtime. This study examines the effectiveness of PdM-ML in wind turbine and PV systems by analyzing operational data, performing data preprocessing, and developing machine learning models for each system. The results indicate that the model for wind turbines can predict failures in critical components such as gearboxes and blades with high accuracy. In contrast, the model for PV systems is effective in predicting efficiency declines in inverters and solar panels. Regarding operational complexity, each model has advantages and disadvantages of its own, but when compared to conventional maintenance techniques, both provide lower costs with greater operational efficiency. In conclusion, machine learning-based predictive maintenance is a promising solution for enhancing the reliability and efficiency of renewable energy systems.