Bragg's law gives the angles for coherent scattering from a crystal lattice. When X-rays are incident on an atom, they make the electronic cloud move. The movement of these charges re-radiates waves with the same frequency ; this phenomenon is known as Rayleigh scattering (or elastic scattering). These re-emitted wave fields interfere with each other either constructively or destructively (overlapping waves either add together to produce stronger peaks or subtract from each other to some degree), producing a diffraction pattern.
MTGN 311 Structure of Materials with Prof. Gorman will provide you with more details about this important law.