Critical water and wastewater treatment applications have been optimized, modelled, and automated using artificial intelligence (AI) techniques and machine-learning models. Also, it describes the cases in which machine learning algorithms have been applied to evaluate the water quality in different water environments, such as surface water, groundwater, drinking water, sewage, and seawater. Wastewater characteristics prediction in wastewater treatment plants (WWTPs) is valuable and can reduce the number of samplings, energy, and cost. The study reviews machine learning, deep learning, and smart technologies used in wastewater treatment for generation, prediction enhancement, and classification tasks, providing a guide for future water resources challenges. These models can be used to make decisions in water resources management and governance, but ethics and future directions need to be addressed and focused.