In the field of solar energy forecasting, the accurate prediction of photovoltaic (PV) system output remains a pivotal challenge. This study addresses this challenge through an innovative approach, employing sky image processing for the prediction of solar power energy production. Central to this approach is the utilization of the XG Boost Regressor, a machine learning algorithm renowned for its efficiency and accuracy. Unlike traditional methods such as Random Forest Regression, Gradient Boosting, K-Nearest Neighbors (KNN), and Support Vector Regression (SVR), the XG Boost Regressor demonstrated superior performance, evidenced by its lower Mean Squared Error (MSE). A key aspect of this study was the application of Principal Component Analysis (PCA) for dimensionality reduction within the sky image dataset. This technique effectively distilled the dataset to its most essential features, thereby enhancing the modeling process. The predictive model, based on images captured at regular intervals, was rigorously evaluated using several metrics, including Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), relative absolute error (RAE), and relative squared error (RSE). The results were compelling, with the XG Boost Regressor achieving a RAE rate of 0.100121089, a MSE of 0.001425576, a MAE of 0.0019102173, and a root relative squared error (RRSE) of 0.146707803. These metrics underscore the model's high accuracy in forecasting solar power energy. Additionally, the study incorporated RGB histograms for the extraction of dimensional features from the image data. This, coupled with the PCA for dimensionality reduction, formed a robust methodology for estimating solar energy output. The integration of the XG Boost Regressor and PCA not only facilitated accurate solar power energy predictions but also marked a significant advancement in the field of renewable energy forecasting. The findings from this research underscore the efficacy of the XG Boost Regressor and PCA in solar power prediction, offering a promising avenue for future developments in the renewable energy sector.