a

just forget about copying and pasting. why everyone who starts wants to copy paste 1000 lines of codes from different websites and expect to work.

Am I right in thinking that you have wired your lights through Relays?

Then, can you check the Blink example that comes with arduino IDE and confirm it works?of course changing the ledpin from 13 to where you have the relay connected.
we need to start from the basics to know at which point you are cause if you are not using a single DigitalWrite in your code and dont see this as the problem, then we certainly need to start from the beginning. (Arduino basic tutorials)