A light in an oven allows you to see to place food in the oven, to check on foods while they are baking and to see when you are removing the food. Oven light bulbs are typically covered by a glass light cover or dome. If that protective covering is missing or broken and the light bulb is exposed, it can be hit and become broken. If the bulb is not specifically designed for use in an oven (i.e., it's not heatproof), that can be another reason it can break.
Unplug the oven from its power source or shut off the electrical breaker. Put on a pair of work gloves to protect your hands from the broken glass.
Open the oven door and locate the light bulb holder. Carefully remove the glass light cover by grabbing the front edge; pull it off. Depending on the brand of oven you have, you may need to turn the dome light bulb cover in a counterclockwise direction before you can remove it.
Use a wet/dry vacuum to remove all the broken glass in the light bulb holder. This will keep it from spreading into the open oven area.
Remove the bulb from the socket with a pair of pliers. Firmly grab the threaded metal base and turn it counterclockwise.
Screw the replacement light bulb into the threaded metal base. Replace the glass light cover and reconnect the power to the oven.
Always disconnect an oven from its power source before you work on it. Never attempt to work inside an oven that's hot. Wait for it to cool down first. Be extremely careful when working with broken glass.