Simulating galaxy clusters -II. Global star formation histories and the galaxy populations