I would say because their wavelength is comparable with the intermolecular distances inside the crystal.
X-rays have a wavelength small enough to be compared with the distances between atoms inside the crystal and to give, during the interaction with the crystals lattice, the effect of diffraction. This in terms produces a diffraction pattern (sometimes called an interference pattern) that reflects the internal structure of the crystal (it is not easy to interpret though!).
[An x ray of the atomic structure of a beryl crystal]