That device has a direct connection to the battery, so if it doesn't switch on, it's not getting the required battery voltage. It has capacitors in it that can charge up from the battery and power it for about one second. Therefore, if it was flashing on, we can assume that it's connected to the battery to charge the capacitors, but straight away the battery is switching off. One of the functions of this device is to send power from the battery to the controller when you switch it on. The controller doesn't use much power itself. The power for the motor comes directly from the battery to the motor, and the controller works like a tap.
This is what seems to be happening: The control panel has power from the battery. It needs hardly any. When you switch it on, there would be a slightly higher demand for power for the controller, which could cause it to shutdown if the battery is weak/worn out or if there's a bad connection to the battery. The battery would also shutdown if there's a short circuit on those wires to and from the control panel.
With all that in mind, the three things that could be causing it are: 1. Knackered battery; 2. Battery connection issue; 3. Damaged control panel cable or corroded connector.
The circumstances around the problem would give a good clue to the cause. How did the problem start? Was everything perfect one day, then suddenly it started doing that? Think back to what happened before. Did you drop the bike? Did you go out in a rain storm? Had the range of the bike already reduced substantially?