This paper introduces a new way of managing water in irrigation systems, which can be applied to gardens or agricultural fields, replacing human intervention with Wireless Sensor Networks. A typical irrigation system wastes on average 30% of the water used, due to poor management and configuration. This sustainable irrigation system allows a better efficiency in the process of irrigation that can lead to savings for the end user, not only monetary but also in natural resources, such as water and energy, leading to a more sustainable environment. The system can retrieve real time data and use them to determinate the correct amount of water to be used in a garden. With this solution, it is possible to save up to 34% of water when using sensor data from temperature, humidity and soil moisture, or up to 26% when using only temperature inputs. Besides a detailed system architecture, this paper includes a real case scenario implementation and results discussion.