Why won't my pilot light stay lit on my hot water heater?
Here are a few things to consider, from a Reliance water heater Installation Instructions and Use &amp; Care Guide.


  Safety Shut-off
  This water heater is designed to automatically shut-off in  the event of the following:  
  
  
  The pilot flame is extinguished for any reason.
  The water temperature exceeds 195°F (91°C).
  Excessive build up of dust on the base ring filter or  flame arrestor. See Maintenance of your Water Heater  Section.
  The ignition of flammable vapors.
  
  
  A thermocouple is used to determine if a pilot flame is  present, and will shut off the gas supply to the main  burner and the pilot if the flame is absent. This unit is  also equipped with a thermal switch, designed to shut off  the gas supply in the event the water heater has been  exposed to flammable vapors (e.g., spilled gasoline),  poor combustion caused by a blocked vent or insufficient  combustion air. If the thermal switch opens:
  
  
  Check the flame-arrestor for signs of high temperature  (blue or black discoloration). See Figure 29.
  
  
  Click for larger view
  If there are signs of high temperature, inspect your installation for any problems with venting, combustion air supply and for a flammable vapor event (see "Pilot Light Troubleshooting Flow Chart" section). Correct any issues prior to resetting the thermal switch. If you suspect a flammable vapor incident has occurred, do not use this appliance. Immediately call a qualified technician to inspect the appliance. Water heaters subjected to a flammable vapors ignition will require replacement of the entire water heater.
  Reset the thermal switch by depressing the small button in the center of the thermal switch. Follow the Lighting Instructions found on the front of your water heater
  
  
  A high temperature limit switch or ECO (Energy Cut Off) in the tank is used to shut off the unit if the water temperature exceeds 195°F (91°C). The ECO is a single-use switch, which, if activated, requires complete replacement of the entire gas control valve/thermostat. If the ECO should activate, the water heater cannot be used until the gas control valve/thermostat is replaced by a qualified technician.  Contact your local dealer for service information.


Also make sure you check and clean the base-ring filter.


  External Inspection &amp; Cleaning of the Base-Ring Filter
  
  
  At least annually check the base-ring filter (Figure 29)
  for any dust or debris that may have accumulated on 
  the filter screen. NOTE: If the water heater is located 
  in an area that is subjected to lint and dirt, it may be 
  necessary to check the base-ring filter more frequently.
  Follow the Lighting Instructions to turn off the water 
  heater and allow it to cool for 10 minutes before 
  attempting to clean the base-ring filter.
  Use a vacuum cleaner with a hose attachment to 
  remove any dust or debris that may have accumulated 
  on the filter. NOTE: If unable to inspect or clean the 
  base-ring filter, follow the “Cleaning the Combustion 
  Chamber and Flame-arrestor” instructions.
  After the base-ring filter has been cleaned, follow 
  the Lighting Instructions to return the water heater to 
  service.
  


The guide also has a pretty good troubleshooting section.


  
  Click for larger View


Make sure the unit has plenty of combustion air. Often after a flood in the basement, folks tend to shuffle things around. If things are stacked too closely to the appliances, the combustion air to appliances can be restricted.