A defective door switch may not signal the control board that the door is open or closed which may prevent the microwave light from turning on or prevent the button that controls the light from functioning. To determine if any of the door switches are defective, use a multimeter to test each of the switches for continuity. If any of the door switches do not have continuity, the switch or switches should be replaced.
Before replacing the light socket, replace the light bulb. If you replace the light bulb, and the light still doesn’t work, use a multimeter to test the light socket for continuity. If the light socket does not have continuity, replace it.