If a photon of light hits the atom it will be absorbed if, and only if, energy of that photon is equal to the difference between the ground state and another energy level in that atom. This raises the electron to a higher energy level.