The semiconductor-insulator phase transition of the single-layer manganite La 0.5 Sr 1.5 MnO 4 has been studied by means of high-resolution synchrotron x-ray powder diffraction and resonant x-ray scattering at the Mn K edge. We conclude that a concomitant structural transition from tetragonal I4/mmm to orthorhombic Cmcm phases drives this electronic transition. A detailed symmetry-mode analysis reveals that condensation of three soft modes-2 (B 2u ), X + 1 (B 2u ) and X + 1 (A)-acting on the oxygen atoms accounts for the structural transformation. The 2 mode leads to a pseudo Jahn-Teller distortion (in the orthorhombic bc plane only) on one Mn site (Mn1), whereas the two X + 1 modes produce an overall contraction of the other Mn site (Mn2) and expansion of the Mn1 one. The X + 1 modes are responsible for the tetragonal superlattice (1/2,1/2,0)-type reflections in agreement with a checkerboard ordering of two different Mn sites. A strong enhancement of the scattered intensity has been observed for these superlattice reflections close to the Mn K edge, which could be ascribed to some degree of charge disproportion between the two Mn sites of about 0.15 electrons. We also found that the local geometrical anisotropy of the Mn1 atoms and its ordering originated by the condensed 2 mode alone perfectly explains the resonant scattering of forbidden (1/4,1/4,0)-type reflections without invoking any orbital ordering.