Why does a photon can only be absorbed by an electron if the energy of the photon equals to the energy difference between two energy level levels? As my title suggests, I am a bit confused as in why does a photon require exactly amount of energy in order to be absorbed by an electron? What will happen if the photon has more energy than the required band?
 A: It doesn't. When a photon frees an electron from a bound state, and the electron carries away the extra energy, we call the process the photoelectric effect. When a photon facilitates a transition between between bound states, and a photon carries away the excess energy, we call it Raman scattering. There are many other styles of interaction involving phonons, collisions, free-free transitions, ...
However, when the photon energy matches the difference in energy between an occupied and unoccupied bound state, the probability that the photon will interact is enhanced. If what you're seeing in an experiment is that enhancement, it may seem that this is required, but it's not.
A: Photons when created by electron transitions are created not only with a certain energy but also a certain frequency.  The frequency of the photon is important to the interaction with the receiving electron in an atom/molecule .... resonance is a way of efficiently transferring energy. If this was not the case all photons would be absorbed by all matter.
Furthermore as the electron can only have certain discrete energy levels only the correct photon can be absorbed. These levels are required as shown by the famous Schrodinger equation.  The equation, when solved, balances the force of attraction to the nucleus with the electrons kinetic energy, and also the fact that any motion of the electron due to this "E" field is opposed my a magnetic force at 90 degrees (the i term) which results in a sinusoidal movement in 3D.
In atoms the energy levels are very distinct compared to molecules.  In molecules we have many infrared bands which can allow additional absorption/emissions such as Raman or Stokes scattering.
