Absorption & emission spectra The process of obtaining an absorption spectra involves passing a complete spectrum of light from the material under consideration. The material absorbs the specific wavelength and allows the rest to pass through. But the reason of this absorption is given as the specific quantum gaps between the various electronic energy levels in the material and when an electron jumps to a higher level only a specific wavelength photon is absorbed. But the higher energy state is considered to be unstable and thus the electron will fall back immediately and would again give the wavelength preventing any spectra to be formed. The same doubt is in emission spectra when used to describe various flame colours but the same doubts apply there too.
 A: You do not state your question clearly

But the higher energy state is considered to be unstable and thus the electron will fall back immediately and would again give the wavelength preventing any spectra to be formed. The same doubt is in emission spectra when used to describe various flame colours but the same doubts apply there too.

I suppose you are asking "why we can see absorption and emission spectra after all, if de-excitation happens almost immediately".
Consider what happens with light absorption : A beam of light falls on the sample and one of its photons  with the appropriate energy  excites the electron to a higher state. The electron almost instantaneously falls back into the ground state  BUT it has now got the four pi spherical angles  to be emitted in, instead of in the direction of the beam. If one puts the film/detector well away from the beam direction one will see the emission spectrum. The film in the direction of the beam will be depleted at the frequencies of the absorption and show up as  dark lines.
