When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Door light switch contacts can be cleaned with contact cleaner spray or fine Emery paper
If you mean this light it's controlled by a switch at the front of the door.
When the door closes it pushes the switch in, switching light off.
Sometimes a sticking switch can be rectified by pushing switch in and out with your hand.