What is the difference between a transparent material and an opaque one at the atomic level? What is the difference between a transparent material and an opaque one at the atomic level? I know that something is transparent to light because the energy of the photons that correspond to visible light does not match the transition energy of the atoms that make up that body. What happens when something is opaque? And why the angle of incidence is always equal to the angle of reflection? I know about the Fermat's principle and all the mathematical arguments, but I was looking for a "physical picture" of the phenomenon.
 A: First, you are asking about the material being opaque or transparent to visible light, so we are talking about visible wavelength photons (400-700nm). And you are asking about QM level explanation. You are right to ask the question, because most explanations on this site are more classical, and in this case, you might be curious about what happens at the levels of atoms and photons.
You are asking why the angle of reflection is always equal to the angle of incidence. This is a common misconception. 


*

*This is only true for specular reflection (mirror-like), where the relative phase and angle of photons are kept. Most of the photons, in this case, will have an angle relatively (to each other) same. 

*For diffuse reflection the angle of reflection is random. This way the relative angle of the photons is not kept, and you do not see a mirror image.
Now you are asking why some materials are opaque. First of all, there are materials that are partially transparent, like some liquids, some gases, but let's disregard that for now, and just take the simple two cases of opaque and transparent materials. Opaque materials are opaque because:


*

*opaque materials reflect (or absorb) most of the visible wavelength photons at their surface, and do not let visible light propagate through them (from the opposite direction into your eyes). For example, a normal mirror is opaque too. There are some mirrors (interrogation room), that is opaque from one side, and transparent from the other side (it is basically a trick because from one side they let more than 50% of the photons through, and from the other side less then 50%).

*in the case of metals, opaqueness comes from reflection (elastic scattering), and for some other materials, it comes from absorption and re-emission (at the surface) of visible light. That is why metals do not have their own color, they reflect all visible light. Other non-metallic materials absorb and re-emit visible light, that is how we see their colors.
Now transparent materials are transparent because:


*

*they do not reflect most visible light, but let most visible light refract, that is travel inside them. Some transparent media (like air) and glass, let light travel so, that the photons keep their relative phases and energies (and relative angles) inside the media so that you see a mirror image on the other side of the media. That is why glass (and air) lets light keep a mirror image inside them.

*In the case of transparent media, it is elastic scattering. As the photons travel through the glass, air, water, they elastically scatter off the molecules and atoms of the material and keep their relative phases, energies, and angles. It is a common misconception that inside the air, glass or water, photons get absorbed and re-emitted. That would not keep their energy levels, and relative phases, and angles. Only elastic scattering keeps a mirror image.
Now you would think that glass only refracts. But in reality, when you look at a glass window, it will both refract and reflect, and in both cases usually will give you a perfect mirror image. Even if you stand on both sides of the glass, you might get a mirror image of what is on the other side, and what is behind you (reflection). When you look at the glass window you can sometimes see a mirror image of yourself too. This is because glass reflects and refracts.
Now you could ask, then what is the real difference between reflection and refraction in the case of glass, when it does the same thing at the same time. Both reflection and refraction is elastic scattering. This is the only way the photons keep their energies, relative phases and angles. The only difference between refraction and reflection in the case of glass is the angle. For reflection, the angle is the same as the angle of incidence (and the photons move backwards in the original medium, air). For refraction, the angle changes (but the relative angle of the photons is kept), as the photons pass through the glass.
The question then comes down at the QM level to why some materials refract and why some reflect (most visible light). Here is a good explanation:
Why certain objects reflect while some refract?
A: There’s often nothing easily intuitive about the difference between transparent and opaque materials on an atomic level. 
Take, for instance, carbon, which can form as diamond (transparent) and graphite (opaque).  What’s the atomic difference between the two?  Well the atoms are the same, but in each case they have a different crystal arrangement. So something about the arrangement of the atoms is responsible for the difference in transparency. 
Unfortunately, the difference in optical properties must be understood through complex calculations of the crystal lattice, including the species of the atoms, their relative orientations, the strength of their  couplings, possible inclusions/dopants.  In general, nothing can be easily understood without cranking through the calculations.  And of course, once you’ve done a calculation, you might find that other physics (like excitons, phonons, or wavelength-scale interference in a slab of material) applies for the colors of interest.
But when the calculations are complete, you’re generally looking for an electronic band gap, which means that electrons cannot absorb photons of a range of energies because they have no available states at those energies. When that condition is fulfilled, the material has a good chance of being transparent. If not, it will certainly not be transparent (although it might be a little transparent if thin enough).  
That said, there are a few intuitive rules which can sometimes be applicable.  For example, stronger binding between atoms, and smaller atoms, usually result in wider electronic band gaps for insulators (because the atoms are closer together), meaning that it will be transparent over a wider color range. That’s why, for example, diamond is transparent while silicon (also group IV and of the same crystal structure) is not (for visible light; they are both transparent in the infrared).
