For the past 100 years, X-ray diffraction has been a powerful and indispensable tool to study the structure of matter. The challenge when studying molecular ordering in biological materials is their inherent disorder and strong fluctuations, which often suppress the formation of Bragg peaks. In the case of membranes, X-rays can detect molecules inside and confined between membranes. In this article we review examples to highlight the capabilities and accomplishments of X-ray scattering for the determination of membrane structure. X-ray diffraction gives quantitative information about partitioning of a small molecule, ethanol, in lipid bilayers. By taking amyloid-peptides as examples, it is demonstrated that the position of peptides in lipid membranes can be determined with high precision. Confinement between membranes can organize molecules, as is the case for a mono-nucleotide, adenosine monophosphate, and the resulting pattern might be important to understand the formation of short RNA strands. With new approaches and techniques, and the increasingly powerful and capable devices, X-ray diffraction will continue to be the work horse for the determination of molecular structure in biological materials.