How does a laser produce coherent light?
A laser produces coherent light through a process known as STIMULATED EMISSION.
You may know that light is the result of spontaneous emission of a photon by an electron undergoing a transition in an atom.
As you can see in the picture the electron (that previously absorbed energy and jumped to the higher level) returns to the lower level almost immediately emitting a photon of light of frequency proportional to the gap between the 2 levels (can be a red, green, yellow....photon);
In white light, like from the Sun, you have electrons doing a lot of different spontaneous rapid transitions at different times so you have all the colors (frequencies) and phases (incoherent light).
In a laser you have only a color (only one frequency) and all the photons are basically...twins!!!! They all have the same phase...so laser light is highly coherent.
To achieve this you must use a substance with kind of "parking" levels where the electrons can stay for a while (they are called metastable).
When a lot of electrons end up parked on these parking levels they can then fall all together emitting all the "same" kind of photons.
In the picture you can see how the atoms of the lasing material ended up having their electrons parked in the metastable level
(Picture Source: http://hyperphysics.phy-astr.gsu.edu/hbase/mod5.html)