The scarcity of energy resources and global warming over the past few decades have prompted the widespread adoption of renewable energy sources. Among the potential renewable energy sources, solar energy has emerged as one of the most promising renewable energy sources. However, the uncertainty and fluctuations of solar power generation create negative impacts on the stability and reliability of the electric grid, planning of operation, economic feasibility, and investment. Therefore, accurate prediction of solar power generation is crucial to ensure the stability of the power grid and promote a large-scale investment in a solar energy system. A large number of research studies have been conducted on predicting solar power generation under different perspectives. However, no existing study analyses and predicts power generation of multi-solar energy sites by only one prediction model. The integration of multiple sites into one predictive model will reduce the number of required models for each site, thereby saving the computing resources and required calculation time. This paper proposes a novel methodology to group multiple solar sites and develop an integrated model by using a machine learning algorithm to predict power generation of each group. Firstly, the K-means clustering algorithm is utilized to cluster multiple solar sites which have similar power generation properties into one group. Then, a machine learning algorithm has been developed to predict power generation in a computationally fast and reliable manner. The proposed approach is verified by the real data of 223 solar sites in Taiwan. The experimental results show that the training time can be reduced by 93.2% without reducing the accuracy of the prediction model. Therefore, the cluster-based prediction approach gives better performance as compared with existing models.