DIAGNOSIS The door switch assembly is faulty. A microswitch that tells the control board the door is closed is stuck in the 'on' position or has failed.
FIX Check for obvious door misalignment first. Push firmly on the door while closed. If the light goes out, the latch hooks are worn or the door needs adjustment. If the light stays on, a switch is defective.
IF THAT DIDN'T WORK The primary door switch (usually a small plastic component near the latch) has failed. This requires disassembly to access and test/replace the switch. It's a common failure point due to mechanical wear.
HEADS UP A faulty door switch is a safety hazard. The microwave could potentially operate with the door ajar. Stop using it and unplug it until the switch is replaced.