We apply the semi-analytical galaxy formation code of Cole et al. to investigate the formation of globular cluster (GC) systems in hierarchical clustering scenarios. The nature of the model allows us to investigate the properties of GC systems and their parent galaxies within a cosmological framework, over a wide dynamic range of mass and time resolution. Assuming GCs form during mergers of gaseous systems, the metal-rich peak of the classical 'bimodal' metallicity distribution of GCs naturally falls out of our model, where such merging occurs over a wide range of redshifts. The physical origin of old, metal-poor GCs (the metal-poor peak) is harder to model, since their formation must be decoupled from the ongoing star formation in these systems at high redshift (z~5). Within the context of semi-analytic models in general, a possible solution lies in a cut-off in the GC formation efficiency at a characteristic star formation rate.