Well, it's really not a code so much as a game.
Any time you click on a light, it will move one space or jump over one and only one light of the opposite color.