We revisit the concept of marginal stability in glasses, and determine its range of applicability in the context of avalanche-type response to slow external driving. We argue that there is an intimate connection between a pseudo-gap in the distribution of local fields and crackling in systems with long-range interactions. We show how the principle of marginal stability offers a unifying perspective on the phenomenology of systems as diverse as spin and electron glasses, hard spheres, pinned elastic interfaces and the plasticity of soft amorphous solids.