The aim of the game is to turn all of the lights off.
When there is an evenly-spaced sequence of bulbs all turned off or all turned on, you may switch them all on or off by clicking two consecutive lights in the sequence.