In this paper, a Long Short-Term Memory Neural Networks (LSTM) Deep Learning Approach is proposed to forecast Global horizontal solar Irradiation (GHI) in Erfoud Moroccan city. The main objective is to predict simultaneously hourly and sub-hourly GHI for time horizons from h + 1 to h + 6, and from 10 min + 10 to 10 min + 60, based only on endogenous historical data. For this purpose, two scenarios have been proposed, an annual performances scenario to consider all meteorological conditions of the year and seasonal performances scenario to distinguish the meteorological conditions characterizing each season of the year. In addition, LSTM performances are compared to those of the Multi-Layers Perceptron Artificial Neural Networks (MLP-ANN) and Random Forest (RF) ensemble method. The annual performances results show that LSTM models are the most efficient and predict precisely hourly and sub-hourly GHI for all time horizons against ANN and RF models with nRMSE varies from 11.63% for h + 1 to 17.35% for h + 6, and from 11.28% for 10 min + 10 to 14.88% for 10 min + 60. As well, the improvement in terms of nRMSE due to LSTM utilization compared to ANN and RF is more important with the forecast horizon increase. This study also reveals that sub-hourly GHI prediction performances are more accurate than for those of hourly GHI prediction, especially for a long time horizon (from 10 min + 40 to 10 min + 60). Moreover, the seasonal study shows that the global horizontal irradiation is more difficult to predict during autumn than other seasons due to the high meteorological variability observed in this period. However, the LSTM deep learning approach is the most robust even in the case of the high variability of GHI. While the ANN and RF are the most sensitive ones.