YL 38 moisture sensor
D1 acts as sort of a pullup on the (open-collector)output of U1A. You can short it out. 

If the output is going into a 3.3V system and your module is powered from 5V, you may not want to do that and just black the LED out with some nail polish or a Sharpie. Or add a pullup to the 3.3V and remove the LED. 

D2 is just a power indicator LED so you can remove it or (better, I think) remove R4. Or short D2 (which wastes a few mA).