The recent developments in synchrotron optics, X-ray detectors, and data analysis algorithms have enhanced the capability of the surface X-ray diffraction technique. This technique has been used to clarify the atomic arrangement around surfaces in a non-contact and nondestructive manner. An overview of surface X-ray diffraction, from the historical development to recent topics, is presented. In the early stage of this technique, surface reconstructions of simple semiconductors or metals were studied. Currently, the surface or interface structures of complicated functional materials are examined with sub-Å resolution. As examples, the surface structure determination of organic semiconductors and of a one-dimensional structure on silicon are presented. A new frontier is time-resolved interfacial structure analysis. A recent observation of the structure and dynamics of the electric double layer of ionic liquids, and an investigation of the structural evolution in the wettability transition on a TiO2 surface that utilizes a newly designed time-resolved surface diffractometer, are presented.