Groundwater is one of the water resources used to preserve natural water sources for drinking, irrigation, and several other purposes, especially in industrial applications. Human activities related to industry and agriculture result in groundwater contamination. Therefore, investigating water quality is essential for drinking and irrigation purposes. In this work, the water quality index (WQI) was used to identify the suitability of water for drinking and irrigation. However, generating an accurate WQI requires much time, as errors may be made during the sub-index calculations. Hence, an artificial intelligence (AI) prediction model was built to reduce both time and errors. Eighty data samples were collected from Sakrand, a city in the province of Sindh, to investigate the area’s WQI. The classification learners were used with raw data samples and the normalized data to select the best classifier among the following decision trees: support vector machine (SVM), k-nearest neighbors (K-NN), ensemble tree (ET), and discrimination analysis (DA). These were included in the classification learner tool in MATLAB. The results revealed that SVM was the best raw and normalized data classifier. The prediction accuracy levels for the training data were 90.8% and 89.2% for the raw and normalized data, respectively. Meanwhile, the prediction accuracy levels for the testing data were 86.67 and 93.33% for the raw and normalized data, respectively.