The rapid growth of digital services has intensified the energy demands of data centers, significantly impacting operational costs and global carbon footprints. This study leverages Machine Learning (ML) and Big Data to optimize energy management in data centers, addressing limitations in prior approaches that overlooked real-time variability. A predictive model utilizing the Random Forest algorithm was developed to reduce energy consumption based on dynamic factors, such as workload and environmental conditions like temperature. The research used a six-month dataset consisting of approximately 3 million data points from an operational data center. After preprocessing the data, the model achieved a high predictive accuracy, reflected by an R-squared value of 0.87. The findings demonstrate that the model reduces energy consumption by an average of 11.17% daily, with peak savings of up to 15.56% during off-peak hours. Key metrics, including a Mean Squared Error (MSE) of 0.034 and a Root Mean Squared Error (RMSE) of 0.184, validated the model's effectiveness and reliability. Statistical tests further confirmed its precision within a 95% confidence interval. This study contributes to the academic field by integrating real-time environmental data into predictive modeling, offering a scalable solution for energy-efficient data center operations. The outcomes support sustainability initiatives by mitigating carbon emissions and reducing operational costs. The findings also provide a framework for applying ML in broader industrial contexts requiring efficient energy management. Future research may explore incorporating additional variables, such as user behavior, to further refine predictive capabilities.