Negative externalities of fossil fuels together with adjuvant features of solar energy is driving the global espousal of solar energy technologies. This article presents a forecasting model for photovoltaic (PV) power generation using real-time data analysis of two solar plants through machine learning time series model (MLTSM). The work focuses on critical factors such as predictive accuracy, residual distribution, RMSE values, data quality, and model suitability for forecasting. The findings demonstrate that the predictive model achieves an accuracy of 98% for Plant 1 and 91% for Plant 2. Overall, the MLTSM exhibits its effectiveness in enhancing PV power generation forecasting, thereby contributing to the attainment of energy security.