-
pins 0 and 1 are not good pins to use because these are also used for serial communications. For example, you may want to add Serial.print() debug statements so you can see how far your sketch progresses.
-
You read the light sensor only in setup. Any changes in light during the day will be ignored.
Post the code you say works with just a switch.
State what type of light sensor you are using. An LDR, for example, requires an additional resistor to form a potential divider. Better, post also a wiring diagram