One possible reason could be a bad thermocouple. This is a rod shaped device that is close to the flame. It's function is to turn off the gas if the pilot light goes out. Heat from the flame operates the thermocouple. When the flame goes out the thermocouple cools off and shuts off the gas. When one goes bad it will not let you light the pilot. Here's a picture of what one looks like. There's a bracket that holds it in place.
Answers & Comments
One possible reason could be a bad thermocouple. This is a rod shaped device that is close to the flame. It's function is to turn off the gas if the pilot light goes out. Heat from the flame operates the thermocouple. When the flame goes out the thermocouple cools off and shuts off the gas. When one goes bad it will not let you light the pilot. Here's a picture of what one looks like. There's a bracket that holds it in place.