How to use DO pin on ldr module?
The DO pin gives a Digital Output that is HIGH when the light falling on the LDR is above a threshold, and LOW when it's below a threshold. Just connect it to a digital input pin and read that pin with digitalRead(). 

You can change the threshold by adjusting the small blue trimpot.