If the pilot light on your gas water heater keeps going out, your pilot light’s orifice could be dirty and clogged, making the flame small and unsustainable. Check to make sure there is no obvious dirt and debris clogging this area.
If this is not the issue, there may be a problem with the thermocouple. This is the part that extends from the temperature control into the flame of a pilot light and helps the main burner fire up once the water temperature has gone too low. The pilot light could be affected if the thermocouple is faulty or does not come into contact with the pilot flame. If you are handy, you can replace this part yourself. If not, call a service technician to assist you.
Low gas pressure or a malfunctioning gas control valve could also cause a pilot light to go out repeatedly. Always call an appliance repairperson or your gas company if you suspect this is the issue.