Here’s the short answer: By turning the lights on you are causing a fire right there in your home—there are sparks of fire created by the electricity.

Another school of thought explains as follows: The switch closes a circuit which allows the electricity to flow, and therefore falls into the category of “the final hammer blow” or completing something on Shabbat that was incomplete prior to Shabbat (the circuit).

Yet another reason has to do with cooking: The electricity heats the filament in the bulb to the point of changing it, which is considered 'cooking metal'.

Remember, working on Shabbat does not mean doing strenuous labor. It means doing creative acts that manipulate nature. That's what is not allowed on Shabbat.

When G‑d rested on the seventh day he was not suffering from over-exertion. He rested in the sense that He ceased creating. We must do the same.