It was Max Laue who first discovered X-rays were diffracted by crystals and he was awarded the Nobel Prize in physics in 1914 for his work. He established that X-rays were electromagnetic in nature and he opened the way to the later work of Sir William Henry Bragg and William Lawrence Bragg. This father and son team were also awarded the Nobel prize in physics in the following year "for their services in the analysis of crystal structure by means of X-rays".
The structure of a crystalline material is determined using X-rays by studying the interference patterns produced when the rays are diffracted by the crystal lattice. The interference patterns can be visualised using photographic film producing a series of dark and light spots, a diffraction pattern. Then mathematical calculations involving the distances and relative positions of the spots are used to determine the molecular structure.