  [Abridged] We study the evolution of the dust temperatures of galaxies in the
SFR-M* plane up to z~2 using observations from the Herschel Space Observatory.
Starting from a sample of galaxies with reliable star-formation rates (SFRs),
stellar masses (M*) and redshift estimates, we grid the SFR-M* parameter space
in several redshift ranges and estimate the mean Tdust of each SFR-M*-z bin.
Dust temperatures are inferred using the stacked far-infrared flux densities of
our SFR-M*-z bins. At all redshifts, Tdust increases with infrared luminosities
(LIR), specific SFRs (SSFR; i.e., SFR/M*) and distances with respect to the
main sequence (MS) of the SFR-M* plane (i.e.,
D_SSFR_MS=log[SSFR(galaxy)/SSFR_MS(M*,z)]). The Tdust-SSFR and Tdust-D_SSFR_MS
correlations are statistically more significant than the Tdust-LIR one. While
the slopes of these three correlations are redshift-independent, their
normalizations evolve from z=0 and z~2. We convert these results into a recipe
to derive Tdust from SFR, M* and z. The existence of a strong Tdust-D_SSFR_MS
correlation provides us with information on the dust and gas content of
galaxies. (i) The slope of the Tdust-D__SSFR_MS correlation can be explained by
the increase of the star-formation efficiency (SFE; SFR/Mgas) with D_SSFR_MS as
found locally by molecular gas studies. (ii) At fixed D_SSFR_MS, the constant
Tdust observed in galaxies probing large ranges in SFR and M* can be explained
by an increase or decrease of the number of star-forming regions with
comparable SFE enclosed in them. (iii) At high redshift, the normalization
towards hotter temperature of the Tdust-D_SSFR_MS correlation can be explained
by the decrease of the metallicities of galaxies or by the increase of the SFE
of MS galaxies. All these results support the hypothesis that the conditions
prevailing in the star-forming regions of MS and far-above-MS galaxies are
different.
