What is the principal cause of diffraction? I have found another question similar to mine here. But I want to know why does diffraction of light happen in the first place. I have found other resources on google which explain the topic partially on the basis of Huygens principle. But 
I'd like to know if the phenomenon of diffraction could be explained at the atomic level in terms of photons, electrons and atoms and how they interact to create this effect?
I've found this video. Is this explanation given here correct?
Lastly, I'd like to know if refraction could be explained at the atomic level.
Please explain in detail. Thank you very much!!
 A: No, the diffraction of light has nothing to do with atoms. Diffraction happens when light propagates undisturbed through free space. All it depends on is the input distribution of the light and that may be caused by some material object.
So the question is, given a certain input optical field, why does it diffract the way it does? How does it work? It is simply a wave effect. There are certain special waves called plane waves that do not change while they propagate through free space apart from a change in phase. Considering propagation in a specific direction that we can call the $z$-direction, one finds that these plane waves pick up different phases, depending on the angle between their directions of propagation and the $z$-direction.
Any input optical field can be expressed as a linear combination (a superposition) of plane waves. The diffraction that we see is now simply the interference effect that we see because of the changes in the relative phase among the different plane waves that make up the optical field as the result of their propagation through free space.
