This study focuses on predicting surface soil temperature (ST) at a 5 cm depth, which significantly influences agricultural decisions such as sowing time, irrigation management and soil-plant-atmosphere dynamics. Machine learning (ML) algorithms were used to predict ST using above-ground weather variables viz., air temperature (T), relative humidity (RH), wind velocity (WV) and sunshine duration (SS) measured at 15-min intervals. Six regression-based ML models (Ensemble, Gaussian Process Regression, Support Vector Machine, Tree, Neural Network and Kernel) were trained and tested for predictive accuracy. The Ensemble Bagging Tree model showed the highest precision, with RMSE values of 2.04 and 1.9 for validation and testing, respectively. Various combinations of the weather variables were tested and the model performed best when using above mentioned variables. Among the predictors, T had the greatest impact on ST prediction, as indicated by mean absolute Shapley values. The Shapley values of the variables revealed that T had a critical role in the model output, with time, SS, RH and WV following in importance. Additionally, as a model explainable artificial intelligence (xAI) metrics, SHapley Additive exPlanations (SHAP) were analysed and found that SHAP dependency had a defined relationship between the predictors and ST at a 5 cm depth. This study highlights the effectiveness of machine learning in predicting soil temperature and emphasizes the role of weather variables in agricultural decision-making. decision-making.