possible cause for the water heater being unable to be lighted
There are one user failure and 2 equipment fails that usually contribute to non lighting water heaters"

User

Not pressing down the pilot button long enough.  After lighting the pilot flame initially, you must hold down the pilot button long enough (30 seconds) to allow the thermocouple (a detector of heat, which sents its signal to the main gas valve) to heat up enough.

Equipment


Thermocouple is broken or misadjusted so that the pilot flame dosen't heat it.
Main gas valve broken.  This must be replaced as there are no 'user serviceable parts' inside.