The most common reasons why a water heater pilot light keeps going out are a faulty thermocouple, a clogged pilot orifice, a dirty flame sensor, or a malfunctioning gas valve. The thermocouple is a safety mechanism that senses if the pilot light is on; if it’s not working correctly, it will shut off the gas to the pilot light. A clogged pilot orifice can cause the pilot light to burn inefficiently and snuff out. A dirty flame sensor won’t detect the pilot light, causing the gas valve to shut off. Finally, a malfunctioning gas valve will shut off the gas supply to the entire unit, including the pilot light.