As Kevin asked, when is this happening? If it is when a train is on or near it, check your wiring, particularly for a lose wire.
If it is a command control switch, press the programming button on the switch. The lantern should be blinking. select SW on your CAB 1 or CAB 2 and key in a number for that switch. The lantern should go out and the switch should respond to commands for that switch.
If neither of those work, call a priest.