Porous underground structures are increasingly studied for hydrogen gas storage due to their significant capacity. A key challenge in this area is accurately estimating hydrogen solubility in water. This study developed three machine learning models using experimental data, with the LSBoost method emerging as the most precise (R² = 0.9997, RMSE = 4.18E-03), outperforming artificial neural networks and support vector machines. Bayesian optimization was employed for model parameter tuning. Residual error analysis confirmed the LSBoost model's accuracy across all data ranges. Correlation analysis indicated that pressure directly affects hydrogen solubility, while salinity has an inverse relationship; temperature showed minimal impact. The LSBoost method, combined with state equations, offers practical applications for underground hydrogen storage.