This is normal, because what the battery light indicates is that the system voltage is below a certain threshold (something like 13.5V, well above the nominal battery voltage but below the charging voltage). A belt connects your engine to the alternator, which in turn charges the battery by applying a slightly higher voltage (usually 14V-14.5V).
In this case, the cause is obvious: the engine is not running, so the alternator isn’t spinning and the system voltage is low.
If this light comes on when the engine is running, you do have an issue. It could be a wiring issue, it could be your serpentine or alternator belt that is broken, or it could, of course, be the alternator itself that failed. It could also be caused by a bad battery.
If this happens while you are driving, it’s important to not panic, to not shut down the engine — since you may not have enough energy left to turn it back on, and to make sure it’s not the serpentine belt that’s broken. A broken serpentine belt usually results in heavy steering, since it’s also connected to the steering fluid pump. This is important, because a broken serpentine belt will no longer drive the water/coolant pump, which in turn means your car’s engine will no longer be properly cooled and can thus overheat.
If the serpentine belt is not broken, you can usually still drive for a bit to a repair shop nearby to have it fixed. With some older cars that don’t rely on electronics for the fuel pump and injection, you can keep driving without any issue (of course, starting will still remain problematic). If the serpentine belt is broken, your car may overheat very quickly, and it is better to pull over and have it towed.