In the Law of Reflection, the angle of incidence is equal to angle of reflection. Why is this true? This is clearly true experimentally, but how does one prove this true mathematically?
This is beautifully explained by Feynman using his path integrals.
I cannot hope to do it better, but just a quick non-mathematical overview. What is mind-blowing about the theory is that you assume that individual photon (on quantum electrodynamics level) is actually "reflected" in each possible direction by each atom of the mirror surface. If you calculate how all these "reflections" interfere with each other, you will see that it wouldn't result in chaos, because most of them tend to silence each other, except for one output angle. The silencing is because depending on timing of each possible path, the phases can be opposite at a place. According to the theory it means that the photon wouldn't probably appear there. What is great about it, is that "summing" (integrating) the phases of all these zillions paths doesn't require a supercomputer, but can be done in few minutes by drawing small pictures on a blackboard - see the video.
The answer by harshit54 is very concise and clear and gives you answers in multiple layers of understanding. However, to quote Leonardo DiCaprio: we need to go deeper. Not because we must, but because we can! There's a TL;DR below.
A beam of light can be thought of as a stream of energy packets (photons, which are the quanta of light - lots of interesting words to look up in the dictionary already). Now let's zoom in and look at what happens when the photon hits any material. It runs into a wall of atoms - lots of nuclei surrounded by electrons (also energy packets - there's more to it but let's not write out all of quantum mechanics here). When a photon hits an electron, its energy gets absorbed and the electron goes into a higher energy state. This does not last long; the electron left an "empty" energy state below it, which is an energetically more favorable position for it. Thus, there is a chance that it spontaneously jumps back to a lower energy state. This chance increases over time, so it's pretty certain that it will jump back quite quickly. When it does, it needs to get rid of its extra energy. This energy is released as a photon!
If this is the only electron in the neighbourhood that releases a photon, it will go in any random direction. HOWEVER! There's a catch. Hint: this is where the wave nature of light comes into play. Let's assume that the beam of light hits the reflecting surface directly from above, so the angle of incidence is 0 degrees. Now you have many electrons that are being bombarded by even more photons, all emitting photons in many directions. The photons that are emitted at an angle however, will be out of phase with eachother (since there is a distance between the electrons, if two photons are emitted at any angle at the same time, there will be a slight delay between them). Photons that are out of phase will tend to cancel eachother out. Photons that are in phase (all the photons that are emitted upwards) will constructively interfere with eachother.
Now something interesting happens - something that also explains why lasers work. When an electron emits a photon, and there are many photons around it who all have the same phase and direction, the emitted photon will copy the phase and direction of the photons around it! So very quickly, all photons that are emitted in random directions die out and only photons that are emitted perfectly in phase with eachother remain.
Now tilt your light beam at an angle. No longer the photons that are emitted upwards are in phase with eachother, but only the photons that are emitted at the exact same angle as the incident photons are in phase. So they remain!
So why does this not happen at any surface? Well, the above only applies to surfaces with lots of electrons, found in materials where electrons are free - for example metals! Surfaces where all electrons are bound will not absorb the photons immediately - they'll penetrate the first few layers of atoms unhindered until by chance they are absorbed. When a new photon is emitted, it will run into other atoms (it's not at the surface anymore!) and keep the reaction going until at the surface, photons are reflected in random directions. Combine this with the fact that without free electrons it is VERY difficult to smooth a surface, it will give you no chance for a decent (specular) reflection.
Photon energy is absorbed by electron
Energy is emitted by electron in the form of a new photon
Photons that are out of phase with eachother die out
Only photons that are emitted at the same angle as the angle of incidence are in phase
Those remain. (Specular) reflection!
The above only works in materials with lots of free electrons, like metals
Well this can be proven in many ways. If you think of light as waves, then use Huygen's Principle.
A much easier proof can also be developed if you consider light as rays propagating in a line. For this we can use Fermat's Principle.
However if you think of light as particles then a much more intuitive proof can be created by considering a ball being hit on the ground. The part of its velocity parallel to the ground will not change (due to conservation of linear momentum) and the part perpendicular to the ground will flip(assuming an Elastic Collision).
It is not necessarily true. A counterexample would be the thought experiment of internal reflection at the surface of a magnetic material, when incident and reflected waves experience different indices of refraction because of magnetic circular birefringence. I think MP Silverman wrote about it, but I cannot find a reference now.
In magneto-optics, one cannot assume Helmholtz reciprocity and reversibility of the rays. ("If I can see you, you can see me.")
The reason for this is that time reversal would also reverse the direction of electrical currents (in coils) and the direction of magnetic fields.
So the basic reason for the law of reflection is symmetry, the time reversibility of the light rays.
This actually follows from the continuity relations of Maxwell’s equations at the interface of two media: the component of the field tangential to the surface must be the same by $\oint\vec E\cdot d\vec \ell=0$ while the normal component will have a discontinuity found by Gauss’ law and related to the ratios of permittivities at the interface.
As others have pointed out, you can look at this from ray optics (Fermat's principle), wave optics (consequence of phase matching from boundary conditions for the wave equation at an interface), or more complicated QM approaches.
There was a counterexample mentioned above that I wanted to add to - all you need is a common birefringent crystal (e.g. calcite). For a ray leaving the crystal through a face at some nonzero angle of incidence, there will be refraction out of the crystal as well as reflection at some angle. If your crystal axis is oriented appropriately, the reflected ray will see a different index than the incident ray, changing the reflected angle to be different than the incident angle. This is all just the consequence of phasematching at the interface.
As a variation on harshit54 's answer, if you look at it classically, the surface exerts a force on the photon in the direction perpendicular to the surface. Thus, only the perpendicular component of the velocity vector changes. Since the magnitude doesn't change, it follows that the angles (as measured from the normal) are flipped.