This contribution is based on the presentation given by the authors at the second French–German summer school on electrochemistry and nanotechnology in September 2007. The objective of the article is to describe, by use of examples, the areas of solid-state chemistry and electrochemistry where X-ray absorption spectroscopy can make a special contribution. The case studies that are discussed include the investigation of the microstructure of nanomaterials, the study of electrodes and electrolytes for solid-state battery applications and the location of dopant sites in oxides. The contribution concludes with a look to future developments in the techniques and the implications for the study of problems of materials.