Land surface temperature (LST) is an important climate indicator that shows the relationship between the atmosphere and land. Due to environmental problems, including global warming, determining the relationship between natural factors and LST is urgent. This study aimed to model LST using a random forest-RF model and several independent factors, that is, altitude, slope, aspect, distance to major roads, parks, water bodies, waterways, farmlands, grasslands, land use, and the “Normalized Difference Vegetation Index (NDVI)” in Shiraz City, the capital of Fars Province, Iran. For this purpose, a series of Landsat and eight satellite images were used to extract LST data in the summer and winter of 2019. In addition, the importance of each factor was also investigated using the RF model. The Results indicated that distance from roads, parks, and water bodies were the most important factors affecting LST spatial variations in summer, whereas NDVI, distance to roads, and altitude were the most effective factors in winter. Performance evaluation of the studied model was 0.53 and 0.48 for R2 and 2.61 and 2.58 for “Root Mean Square Error (RMSE)” in seasons of summer and winter, respectively. This study helps us to understand which factors increase or decrease LST in Shiraz City. In general, green spaces have a main role in decreasing the LST; in contrast, the bare lands had substantially higher temperatures than residential areas. Therefore, this research is crucial for understanding and monitoring the surface thermal environment in the study of climate change.