Even the cleanest of hands should not touch headlight bulbs or their service life may be shortened. Dirt, oil, grease and grime can find their way onto the bulb, causing it to burn out.
Many automobiles use halogen light bulbs in their headlights, which can get extremely hot. The heat is transferred uniformly through the glass casing of the bulb, through the headlight casing, and finally into the atmosphere. However, if there is any oil on the glass bulb, the heat transfer will not be uniform, causing the glass to expand at nonuniform rates.
Due to the dirt and oil associated with working under the hood, precautions must be taken to keep the bulbs as clean as possible. The bulb should be kept in its packaging until the headlight casing and bulb holder are disassembled. New, disposable rubber gloves should be worn when screwing the bulb into place. Use new gloves for each bulb change, since dirt accumulates on them.
Even if you have just washed your hands with soap and water, the skin's natural oils can be enough to break a bulb under high temperatures. If you do not have any gloves handy, a clean paper towel may suffice, though you should minimise the bulb's exposure to the elements between its journey from the packaging to the sealed headlight casing.