Soil temperature (ST) stands as a pivotal parameter in the realm of water resources and irrigation. It serves as a guide for farmers, enabling them to determine optimal planting and fertilization timings. In the backdrop of regions like Iran, where water resources are scarce, a proficient and economical prediction model for ST, particularly at lower depths, becomes imperative. While recent models have demonstrated adeptness in predicting ST, in general, their error decreases with increasing depth, so that they had the lowest error at a depth of 100 cm. Addressing this gap, our study pioneers a novel hybrid model that excels in accurate daily ST prediction as it delves deeper. The models deployed encompass the multilayer perceptron (MLP) and an enhanced version, MLP coupled with the Sperm Swarm Optimization Algorithm (MLP-SSO). These models prognosticate daily ST across varying depths (5-100cm), leveraging meteorological parameters such as air temperature, relative humidity, wind speed, sunshine hours, and precipitation. These parameters are anchored to the Ahvaz and Sabzevar synoptic stations in Iran, spanned over the period from 1997 to 2022. Evaluation of our research outcomes unveils that the root mean square error (RMSE) witnesses its most substantial reduction at a depth of 100cm. For instance, at the Ahvaz station, the MLP-SSO model diminishes the RMSE value from 1.25 to 1.12°C, in contrast to the MLP model. Similarly, at the Sabzevar station, the RMSE value drops from 1.78 to 1.49°C using the coupled MLP-SSO model. These results robustly highlight the considerable enhancement brought about by the utilization of the MLP-SSO model, clearly surpassing the performance of the standalone MLP model. This emphasizes the potential and promise of the MLP-SSO model for future investigations, offering insights that can significantly advance the domain of soil temperature prediction and its implications for agricultural decision-making.