There are some example sketches that come with the Arduino IDE.
If you study these, you will see how to read an analog input and control an digital output.
Since the LDR is connected to the Analog input A0, you can read the LDR voltage divider with.
myLightSensor = analogRead(A0);
For the testing phase you can print the reading to the serial monitor.
Later you can remove the print function, when the project is installed in its final location.
Serial.println(myLightSensor);
You can use this reading to determine if it is time to open the door.
if(myLightSensor > openLevel) {digitalWrite(doorPin,HIGH);}
Later you can close the door with:
if(myLightSensor < closeLevel) {digitalWriter(doorPin,LOW);}
You can added a time delay if needed to achieve door response.
You can add hysteresis to the 'if()' to prevent weird things happening at the switch over event.
Note the sensitivity of your LDR will determine what the value of R8 should be.
Also you can swap R8 an the LDR to reverse the voltage change action on A0 if you need.
An RTC can be used in conjunction with the above.
You will have to experiment with values to handle cloud cover.