The most common cause of a failed pilot light is a malfunctioning thermocouple. The thermocouple is a safety device designed to shut off the flow of gas to the heating unit if the pilot light goes out for any reason: when the pilot light goes out, the thermocouple detects the lack of heat due to the missing flame and shuts off the gas. If, however, the thermocouple is loose or faulty, it becomes the cause of a failed pilot light, shutting off the gas as a safety measure. Another problem is that the orifice on the gas nozzle to the pilot light is tiny and can get clogged with debris, shutting off gas flow and thus the pilot light.
Downdrafts from the outside can travel down the exhaust to the burner area and blow out a pilot light. Downdrafts are usually created if the appliance isn't vented properly, or if the vent isn't working.
Furnaces and water heaters have gas control valves that regulate gas flow. If these complicated devices malfunction, the pilot light may not stay lit. Licensed heating contractors or the gas service can check gas control valves.