Soil moisture content (SMC) plays a critical role in soil science via its influences on agriculture, water resources management, and climate conditions. There is broad interest in finding relationships between groundwater recharge, soil characteristics, and plant properties for the quantification of SMC. The objective of this study was to assess the potential of optical satellite imagery for estimating the SMC over cropland areas. For this purpose, we collected 394 soil samples as targets in Gonbad-e Kavus in the Golestan province in the north of Iran, where a variety of crop types are cultivated. As input data, we first computed several spectral indices from Sentinel 2 (S2) and Landsat 8 (L8) images, such as the Normalized Difference Water Index (NDWI), Modified Normalized Difference Water Index (MNDWI), and Normalized Difference Salinity Index (NDSI), and then analyzed their relationships with surveyed SMC using four machine learning regression algorithms: random forests (RFs), XGBoost, extra tree decision (EDT), and support vector machine (SVM). Results revealed a high and rather similar correlation between the spectral indices and measured SMC values for both S2 and L8 data. The EDT regression algorithm yielded the highest accuracy, with an R2 = 0.82, MAE = 3.74, and RMSE = 1.08 for S2 and R2 = 0.88, RMSE = 2.42, and MAE = 1.08 for L8 images. Results also revealed that MNDWI, NDWI, and NDSI responded most sensitively to SMC estimation.