Water quality has significantly declined over the past few decades due to high industrial rates, rapid urbanization, anthropogenic activities, and inappropriate rubbish disposal in Lake Tanganyika. Consequently, forecasting water quantity and quality is crucial for ensuring sustainable water resource management, which supports agricultural, industrial, and domestic needs while safeguarding ecosystems. The models were assessed using important statistical variables, a dataset comprising six relevant parameters, and water use records. The database contained electrical conductivity, pH, dissolved oxygen, nitrate, phosphates, suspended solids, water temperature, water consumption records, and an appropriate date. Furthermore, Random Forest, K-nearest Neighbor, and Support Vector Machine are the three machine learning methodologies employed for water quality categorization forecasting. Three recurrent neural networks, namely long short-term memory, bidirectional long short-term memory, and the gated recurrent unit, have been specifically designed to predict urban water consumption and water quality index. The water quality classification produced by the Random Forest forecast had the highest accuracy of 99.89%. The GRU model fared better than the LSTM and BiLSTM models with values of R2 and NSE, which are 0.81 and 0.720 for water consumption and 0.78 and 0.759 for water quality index, in the prediction results. The outcomes showed how reliable Random Forest was in classifying water quality forecasts and how reliable gated recurrent units were in predicting water quality indices and water demand. It is worth noting that accurate predictions of water quantity and quality are essential for sustainable resource management, public health protection, and ecological preservation. Such promising research could significantly enhance urban water demand planning and water resource management.