Low-dimensional empirical Galerkin models are developed for spatially evolving laminar and transitional shear layers, based on a Karhunen-Loève decomposition of incompressible two-and three-dimensional Navier-Stokes simulations. It is shown that the key to an accurate Galerkin model is a novel analytical pressure-term representation. The effect of the pressure term is elucidated by a modal energy-flow analysis in a mixing layer, which generalizes the framework developed by Rempfer (1991). In convectively unstable shear layers, it is shown in particular that neglecting small energy terms leads to large amplitude errors in the Galerkin model. The effect of the pressure term and small neglected energy flows is very important for a twodimensional mixing layer, is less pronounced for the three-dimensional analogue, and can be considered as small in an absolutely unstable wake flow.