The soil moisture sensor or the hygrometer is mostly used to detect the humidity of the soil. It is perfect to build an automatic watering system.
Learn how to use the YL-69/HL-69 soil moisture sensor with Arduino: Guide for Soil Moisture Sensor YL-69 or HL-69 with Arduino.