Globular clusters are important tools to help us understand how galaxies form and evolve. Globular cluster formation tells us about the conditions of extreme star formation while their survival from high redshift tell us about the processes of galaxy assembly. Being much brighter than red giant stars, globular clusters allow the stellar populations of galaxies to be studied at much greater distances. Thus a wider range of galaxy masses, environments and morphologies to be studied than can be with resolved stars. Using data from the WAGGS survey of massive star clusters in the Milky Way and its satellite galaxies and the SLUGGS survey of the globular cluster systems of massive early-type galaixes, I will talk about how we can measure the metallicities of globular clusters using the strength of the calcium triplet in integrated light. Using globular cluster metallicity distributions and the relationships between globular cluster colour and metallicity, I will present evidence that different galaxies with similar masses experienced different formation histories. I will compare these observations with the predictions of the E-MOSAICS cosmological simulations of the formation of globular cluster systems. I will also talk about how the E-MOSAICS simulations have allowed to us to understand how globular cluster colour distributions vary with globular cluster luminosity (the ‘blue tilt’).