This is a brain teaser kind of problem.
Observation #1, whether #N light stays on depends on how many unique factors N have. Prime numbers must be off, because it is switched on Round 1 and off in Round N.
Observation #2, for a light #N to stays on, N needs to have odd number of factors. Fact: only square numbers can have odd number of unique factors.
Proof by contradiction: If a number has odd number of unique factors, and is not a square number, write down all its unique factors, and start crossing off the factors: If IJ=N, cross off J as well as I. In the end, there is only one factor M left, MM has to be N.