What is relation between electrons and photon? What is the relation between electrons and photons? Why do atoms get excited when their electrons come in contact with photons? Why do electrons go from a higher to lower energy level when emitting a photon?
 A: First, what is excitation? 
"Excitation is an elevation in energy level above an arbitrary baseline energy state". 
So, for atom to get excited, it needs to absorb some amount of energy, which is described by energy levels for each element. When atom "come in contact with photons", it is usually photon having certain energy that, if enough to move shell's electron to higher energy level, gets atom excited.
It is similar when emitting a photon - when an atom "go from a higher to lower energy level" certain amount of energy is released and that energy is acquired by photon, making the emission possible.
A: Photons are a quanta, or particles of light. The bare minimum piece of light. Consider them like "packets" of light.  
Einstein theorized and proved the Wave-Particle Duality which described the nature of light as both a wave and a particle, and this is how photons were originally speculated upon.
What came from this however, was the Photoelectric-effect which proposed (and was proved) that photons can cause electrons to be emitted from a material because photons have momentum. 
Because photons have momentum, they have Energy, and you will be able to measure the amount of Work done on a material (although nearly insignificant in non-quantum realms).
$ E = h * f $
The energy threshold for a material to release electrons is entirely dependent on that material, and by having enough photons to pass to a material, that material will release electrons.
You can measure the kinetic energy of the emitted electrons:
$ KE_{max} = (h * f) - W $
