Condensed matter physics

Why can the positions of diffraction peaks help determine a crystal's structure?