This study investigates the impact of precipitation on Middle Eastern countries like Iran using precise methods such as stable isotope techniques. Stable isotope data for precipitation in Tehran were obtained from the Global Network of Isotopes in Precipitation (GNIP) station and sampled for two periods: 1961–1987 and 2000–2004. Precipitation samples were collected, stored, and shipped to a laboratory for stable isotope analyses using the GNIP procedure. Several models, including artificial neural networks (ANNs), stepwise regression, and ensemble machine learning approaches, were applied to simulate stable isotope signatures in precipitation. Among the studied machine learning models, XGboost showed the most accurate simulation with higher R2 (0.84 and 0.86) and lower RMSE (1.97 and 12.54), NSE (0.83 and 0.85), AIC (517.44 and 965.57), and BIC values (531.42 and 979.55) for 18O and 2H compared to other models, respectively. The uncertainty in the simulations of the XGboost model was assessed using the bootstrap technique, indicating that this model accurately predicted stable isotope values. Various wavelet coherence analyses were applied to study the associations between stable isotope signatures and their controlling parameters. The BWC analysis results show coherence relationships, mainly ranging from 16 to 32 months for both δ18O–temperature and δ2H–temperature pairs with the highest average wavelet coherence (AWC). Temperature is the dominant predictor influencing stable isotope signatures of precipitation, while precipitation has lower impacts. This study provides valuable insights into the relationship between stable isotopes and climatological parameters of precipitation in Tehran.