The world is increasingly embracing cleaner and more sustainable energy sources, with solar energy playing a crucial role in mitigating greenhouse gas emissions and addressing climate change. Accurate solar radiation predictions are vital for optimizing solar energy resource utilization and identifying suitable locations for solar power plants. Therefore, our study introduces a new model to advance solar and renewable energy systems. In this paper, we suggest a novel hybrid model, Self-attention (SA) mechanism-long short-term memory neural network (LSTM)-M5Tree (SALSTM5T) model, for predicting solar radiation. The SALSTM-M5T model combines the advantages of the Self-attention- LSTM (SALSTM) and M5Tree models. The LSTM component captures long-term solar radiation dependencies. SA improves the accuracy of LSTM and M5T models by focusing on relevant input features at different time steps. The study utilizes K-fold cross-validation to overcome the limitations of traditional methods for determining the size of training and testing data. By combining the advantages of the SALSTM and M5Tree models, our research presents a new framework for accurate solar radiation prediction. Existing techniques are developed by using SA and K-fold cross-validation. Furthermore, our paper emphasizes the practical applications of solar radiation prediction, such as identifying suitable areas for solar power plants and optimizing energy production. Our study concluded that the self-attention mechanism and LSTM model improved the efficiency of M5T models for analyzing solar time series data as these models can attend to important features. The centralized root mean square error (CRMSE) of the SALSTM-M5T, LSTM-M5T, LSTM, ANN, and M5T models was 0.04, 0.17, 0.25, 0.49, and 0.70, respectively. The SALSTM-M5T, LSTM-M5T, LSTM, ANN, and M5T models' correlation coefficients were 0.99, 0.98, 0.96, 0.89, and 0.82, respectively. Our SALSTM-M5T model contributes to advancing renewable energy planning and decision-making. The main innovation of the current article is the development of the M5T model using the capabilities of the SA and LSTM models. The SALSTM-M5T hybrid model, which combines self-attention, LSTM and M5Tree techniques, is proposed as an effective approach for solar radiation prediction. The results show its superiority over other models in terms of accuracy and suitability, which can be useful for practical applications in the field of renewable energy, such as site selection for solar power plants and optimization of energy production. Furthermore, this paper aligns with the advancement of digital sensors to enhance the accuracy of solar radiation prediction.