If you're lighting a water heater and the pilot lights fine, but when the burner engages, you only get a brief puff of gas, check the gas shutoff valve for the house. Sometimes they leak, so that gas builds up in the lines. The leak is enough to keep the pilot lit, and the built up pressure lets the burner run for a second or two, but that's all. Sometimes the shutoff valve will stick a bit as well, so that it's still closed even though it moved somewhat.
(If that's the case for you, you should probably also replace your shutoff valve!)