usually the pump will run on without water, but there are special pumps one can buy that are "water sensing" and will shut off if there is no water in the system...
BUT... if your light went off, its not because your pump shut off but because you lost power to the circuit.
the light is wired to the hot side of the pump, between the pump and the switch, so when the switch is on, the light will be on... even if you remove the pump from the system.
if the light goes off, its because the switch has been turned off or the power went dead because or a blown fuse, short or loose connection.
a blown fuse could be the result of a failed pump, but not always. sometimes they just blow out due to a hard start because of a stuck impeller.