In most cases, it is not dangerous if the water heater pilot light is turned off. This is due to the fact that contemporary gas-fueled water heaters have safety valves that close the supply of gas automatically when the pilot light goes out. This is a vital safety feature, and if your water heater didn't perform it, you'd be in danger of having a natural or propane gas leak that poses an explosion risk. However, this problem may be serious when the water heater is housed in an enclosed space. If your pilot light goes out as a result of a lack of combustible air, it can cause carbon monoxide to build up in space. Carbon monoxide is extremely hazardous and has the potential to kill. We recommend that you invest in a carbon monoxide detector, regardless of where your water heater is located. They are cheap and can be placed near your water heater. If the carbon monoxide levels reach hazardous levels, the detector will notify you.