Visible light energy radiations are just a tiny part of the electromagnetic radiation spectrum. We are able to see this small band of radiations and so it has been the most studied. Whilst this blog is about visible light much of what is said is applicable to the rest of the spectrum.
If you have not red my blog on radiation I there explained that photon energies are pulses and that they, like particles, interact by exchanging energies. Photons energies cohere but they are also influenced by particle energies. So let us consider cohered light passing an edge or through a slit. It diffracts but why?
Diffraction is most evident with monochromatic light that is cohered with plain wavefronts, shown blue in the diagram, which also shows and identifies just 6 of the millions of photon energies in the light beam.
What appears to us as a sharp material edge is in reality a photon exchanging particle structure and it bears influence on and attracts the passing photons, highly attracting those closest to it, less so those furthest from it. The structure attractions are why the photons follow a curving path.
The photons want to maintain both their independence and spatial coherence but to achieve that the bundle of photons represented by a would have to slow substantially whilst the bundle represented by f, would need to speed up substantially. They cannot do that and what happens is photon bundles break up. Bundles a and b do succeed in staying cohered and turn the most. Bundles c and d cohere and turn less and e and f cohere and turn least.