If your water heater is fairly new look for an air intake filter, should be in the fire box or around the base of the water heater, it may be clogged with debri depriving the heater of air. If that's the case it needs to be vacuumed with a self made attachment to get into the small area. You may need a licensed plumber. Also check your fresh air lines to make sure they aren't blowing too much air on windy days right into the firebox. Make sure it's not shutting down when the furnace kicks on, this would indicate lack of oxegon in the area. Lastly replace your main gas controller on the front of the water heater. If I have helped, please rate my answer.
Likely a faulty thermocouple. Easy to replace, just pick one up at your local hardware store and follow the directions.
Check for any type of drafts (natural or man-made in the form of fans, furnace blowers, doors being slammed, etc.) If none of these are the culprit, replace T-Couple. If the T-Couple doesn't fix it, suspect lack of gas pressure, ie: Dirt, dust, in gas valve or small leak. Shut off gas to heater and call HVAC or plumber if inexperienced with gas valves.