Why does the filament of a bulb burn out when exposed to atmosphere whereas that of a heater coil does not?

Both bulb and heater work on the principle of light or heat being generated, when a current passes through a conductor having a finite resistance. Oxidation reaction, that is, chemical reaction of an element with oxygen to form new compounds, is responsible for the bulb's filament burning out. The main important factors influencing this are the temperature and the environment of operation, as well as the chemical nature of the conducting wire. 

In the case of bulb, formerly known as 'incandescent bulb,' the light (electromagnetic radiation) is radiated out, when the filament is heated to very high temperatures (around 3,000 degrees Celsius). The filament is made of a tungsten wire of very small diameter (less than that of a human hair), made into long spiral or spring-like structure (when fully extended, the length can be up to a few feet). Due to this coiled nature of the wire, it offers high resistance to the electrical current, thereby heating up to a very high temperature. Under these conditions, if it is exposed to atmosphere, tungsten filament will react with atmospheric oxygen to form tungsten-oxides. So as to prevent this deleterious process, which can limit the lifetime of the filament, the filament is sealed in vacuum or in inert gas environment. 

In the case of heater, the filament is made of Nicrome alloy (an alloy of nickel and chromium). Since the operating temperatures are in the range of a few hundred degrees Celsius, the required electrical resistance is relatively small and hence, the wire diameter is typically in millimetres and the length is relatively small. Firstly, the temperature of operation of a heater is rather significantly less compared to the bulb and secondly, the alloy is more resistant to chemical oxidation compared to tungsten. Hence, it endures long-term operation under ambient conditions.

Source: thehindu.com