That is one way you could do it. Alex has also suggested in the past writing a script that chages the room description and moves the objects and exits out of the room when the light is off, and then move them all back and change the description back when the light is back on.
Making the dark room and moving the player sounds a lot easier however.

And you could actually just have the one "dark" room for the whole game, and send the player there any time a light is turned out. All you would need is a variable that kept track of what room the player came from when they turned off the light in order to be able to send them back to the right room when the light is on again.