Each light blinks a certain number of times and then repeats. Each number represents the corresponding digit.

The correct code is : 4261

SafeSolution.jpeg