why alkali metals imparts colour to bunsen flame ?
Alkali metals have low ionisation energies and therefore can easily lose the outermost electron. So when the alkali metals are heated in a bunsen burner, the heat of the burner excites the electron to a higher energy level. When the excited electron drops back to its original level, it gives out the extra energy it obtained in the form of radiation. This emitted radiation falls in the visible region of the spectrum which imparts colour to the flame.
Thus we can say that colour arises from the electronic transitions in short lived species which are formed momentarily in the flame.