We compare observed far infrared/sub-millimetre (FIR/sub-mm) galaxy spectral energy distributions (SEDs) of massive galaxies (M-* greater than or similar to 10(10) h(-1) M-circle dot) derived through a stacking analysis with predictions from a new model of galaxy formation. The FIR SEDs of the model galaxies are calculated using a self-consistent model for the absorption and re-emission of radiation by interstellar dust based on radiative transfer calculations and global energy balance arguments. Galaxies are selected based on their position on the specific star formation rate (sSFR)-stellar mass (M-*) plane. We identify a main sequence of star-forming galaxies in the model, i.e. a well-defined relationship between sSFR and M-*, up to redshift z similar to 6. The scatter of this relationship evolves such that it is generally larger at higher stellar masses and higher redshifts. There is a remarkable agreement between the predicted and observed average SEDs across a broad range of redshifts (0.5 less than or similar to z less than or similar to 4) for galaxies on the main sequence. However, the agreement is less good for starburst galaxies at z greater than or similar to 2, selected here to have elevated sSFRs > 10x the main-sequence value. We find that the predicted average SEDs are robust to changing the parameters of our dust model within physically plausible values. We also show that the dust temperature evolution of the main-sequence galaxies in the model is driven by star formation on the main sequence being more burst-dominated at higher redshifts.