In recent times, battery technology used in electric vehicles has drawn numerous researchers' attention. Monitoring the battery condition, particularly the State of charge, is required to ensure the battery's safe and reliable performance. Despite the fact that many SOC estimation methods have been proposed, further research is necessary to identify an approach that adapts versatile lithium-ion battery chemistries. In the recent study it has been demonstrated that Machine Learning approaches have better prediction accuracy compared to conventional methods. To maximize the performance of Machine learning models, it is imperative to select the optimal hyperparameters and employ appropriate input parameters. At present, researchers employ, established heuristics methods to select hyperparameters, which may involve manual tuning or exhaustive search techniques such as random search and grid search. These techniques make the models less accurate and inefficient. In this paper, a systematic, automated process for selecting hyperparameters with a Bayesian optimization algorithm is proposed. In addition, along with the battery parameters (voltage, current and temperature), vehicle velocity, road condition, motor characteristics and environmental conditions are used as the input parameters for accurate SOC prediction. The highly correlated input features are selected through the MRMR algorithm. The performance of six ML algorithms, namely SVM, ANN, GPR, Ensembler, linear regression and Decision Tree, is tested and validated with and without hyperparameter tuning for different data sets. The experimental results demonstrate that the hyperparameter-tuned model outperforms the standard model in estimating the State of charge (SOC). In addition, the model's estimation error is <1 % across a range of vehicle velocity, road condition, motor torque, battery voltage, current, and temperature.