We present a new framework to explain the link between cooling and fragmentation in gravitationally unstable protostellar discs. This framework consists of a simple model for the formation of spiral arms, as well as a criterion, based on the Hill radius, to determine if a spiral arm will fragment. This detailed model of fragmentation is based on the results of numerical simulations of gravitationally unstable protostellar discs, including those found in the literature, as well as our new suite of three-dimensional radiation hydrodynamics simulations of an irradiated, optically thick protostellar disc surrounding an A star. Our set of simulations probes the transition to fragmentation through a scaling of the physical opacity. This model allows us to directly calculate the critical cooling time of Gammie, with results that are consistent with those found from numerical experiment. We demonstrate how this model can be used to predict fragmentation in irradiated protostellar discs. These numerical simulations, as well as the model that they motivate, provide strong support for the hypothesis that gravitational instability is responsible for creating systems with giant planets on wide orbits.