This review discusses picosecond ultrasonics experiments using ultrashort hard x-ray probe pulses to extract the transient strain response of laser-excited nanoscopic structures from Bragg-peak shifts. This method provides direct, layer-specific, and quantitative information on the picosecond strain response for structures down to few-nm thickness. We model the transient strain using the elastic wave equation and express the driving stress using Grüneisen parameters stating that the laser-induced stress is proportional to energy density changes in the microscopic subsystems of the solid, i.e., electrons, phonons and spins. The laser-driven strain response can thus serve as an ultrafast proxy for local energy-density and temperature changes, but we emphasize the importance of the nanoscale morphology for an accurate interpretation due to the Poisson effect. The presented experimental use cases encompass ultrathin and opaque metal-heterostructures, continuous and granular nanolayers as well as negative thermal expansion materials, that each pose a challenge to established all-optical techniques.