Due to increased pollution, greenhouse effect and global warming resulting from power production using fossil fuels, there is increased penetration of renewable energy sources into the power production system. Over the last few years, solar radiation has become a significant means of power production using solar panels and the concept of microgrids has made solar power an indispensable source of power in the distribution system. The power production using solar energy is highly variable and weather dependent which creates a power imbalance into the system when it is penetrated without forecasting. Therefore, solar power prediction plays a critical role in the proper usage of solar energy while keeping the system stable. For automating the power system the forecast needs to be very accurate and thus, it is needed to improve the existing forecasting techniques. In this study, we have proposed a solar radiation scheme based on various meteorological factors, including temperature, humidity, wind speed, and others and used this data for building a machine learning model for prediction. We introduced a hybrid model for prediction which optimizes the parameters of Random Forest using Particle Swarm Optimization technique. The results show empirically that the hybrid RF-PSO model significantly improves the prediction accuracy and reduces the MAE error.