The lights indicate how many waves you have completed successfully.

When it reaches the top, it means the next wave will be a Bonus Stage that contains extra balls and coins.

After completing the Bonus Stage, the lights will start over from the bottom to indicate the start of a new wave. 

Every 10th wave is a Bonus Stage.