In this work, three new convolutional neural network models—spatio-temporal convolutional neural network versions 1 and 2 (ST_CNN_v1 and ST_CNN_v2), and the spatio-temporal dilated convolutional neural network (ST_Dilated_CNN)—are proposed for solar forecasting and processing global horizontal irradiance (GHI) data enriched with meteorological and astronomical variables. A comparative analysis of the proposed models with two traditional benchmark models shows that the proposed ST_Dilated_CNN model outperforms the rest in capturing long-range dependencies, achieving a mean absolute error of 31.12 W/m2, a mean squared error of 54.07 W/m2, and a forecast skill of 37.21%. The statistical analysis carried out on the test set suggested highly significant differences in performance (p-values lower than 0.001 for all metrics in all the considered scenarios), with the model with the lowest variability in performance being ST_CNN_v2. The statistical tests applied confirmed the robustness and reliability of the proposed models under different conditions. In addition, this work highlights the significant influence of astronomical variables on prediction performance. The study also highlights the intricate relationship between the proposed models and meteorological and astronomical input characteristics, providing important insights into the field of solar prediction and reaffirming the need for further research into variability factors that affect the performance of models.