This paper proposes an ensemble voting model for solar radiation forecasting based on machine learning algorithms. Several ensemble models are assessed using a simple average and a weighted average, combining the following algorithms: random forest, extreme gradient boosting, categorical boosting, and adaptive boosting. A clustering algorithm is used to group data according to the weather, and feature selection is applied to choose the most-related inputs and their past observation values. Prediction performance is evaluated by several metrics using a real-world Brazilian database, considering different prediction time horizons of up to 12 h ahead. Numerical results show the weighted average voting approach based on random forest and categorical boosting has superior performance, with an average reduction of 6% for MAE, 3% for RMSE, 16% for MAPE, and 1% for R2 when predicting one hour in advance, outperforming individual machine learning algorithms and other ensemble models.