what must happen for an element to emit visible light

The atom must become excited by absorbing energy from some source.