The management of water resources is becoming increasingly important in several contexts, including agriculture. Recently, innovative agricultural practices, advanced sensors, and Internet of Things (IoT) devices have made it possible to improve the efficiency of water use. However, it is the application of control strategies based on advanced machine learning techniques that enables the adoption of smart irrigation scheduling and the immediate economic, social, and environmental benefits. This challenging research area has attracted the attention of many researchers worldwide, who have proposed several technological and methodological solutions. Unfortunately, the results of these scientific efforts have not yet been categorized in a thematic survey, making it difficult to understand how far we are from optimal water management based on machine learning. This paper fills this gap by focusing on smart irrigation systems with an emphasis on machine learning. More specifically, the generic structure of a smart agriculture system is presented, and existing machine learning strategies and available datasets are discussed. Furthermore, several open issues are identified, especially in the processing of long-term data, also due to the lack of corresponding annotated datasets. Finally, some interesting future research directions to be pursued in order to build scalable, domain-independent approaches are proposed.