What is the quantum mechanical explanation of X-ray diffraction?
The description given in your question pretty much explains things. I would put it in slightly different words which may or may not help, which is that the x-ray photon induces a dipole moment in the atom (a field induced dipole) which then radiates and so the x-ray is scattered. This is pretty much what happens in scattering  by visible photons and we must assume that the photon is distant in energy from any transitions. (In Compton scattering part of the x-ray energy is imparted to the electron, so the frequency of the scattered x-ray is changed).

The field induced dipole moment is proportional to the polarisability which for a single bound electron is 
$$ \alpha = \frac{e^2}{m}\left ( \frac{1}{\omega_0^2-\omega^2} \right )$$

where $\omega_0$ is the resonance frequency of the bound electron and $\omega$ the x-ray frequency and so $\omega &gt;&gt; \omega_0$ which in the limit gives 
$$\alpha \rightarrow -\frac{e^2}{m\omega^2} $$ 
Thus the calculation reduces to understanding the QM calculation for the polarisability. See for example Atkins &amp; Friedmann 'Molecular Quantum Mechanics' Ch $12$.

(  By considering that the x-ray is a plane wave the intensity of scattered radiation relative to that incident is given by 
$$ \frac{I}{I_0}= \frac{e^4}{m^2c^4R^2}P(\theta)$$

where R is the distance from the scattering centre to the detector, m the electron mass and $\theta$ the scattering angle and $P(\theta)=(1+\cos^2(\theta))/2$ is called the polarisation factor.  This formula is sometimes named after Thomson. The $m^{-2}$ shows why significant scattering occurs only from electrons and not from protons. The book by Flygare 'Molecular Structure and Dynamics' section 8.5 gives a detailed description of x-ray scattering in general and details such as calculating atomic scattering factors. )