  We present a simple, largely empirical but physically motivated model to
interpret the mid- and far-infrared spectral energy distributions of galaxies
consistently with the emission at ultraviolet, optical and near-infrared
wavelengths. Our model relies on an existing angle-averaged prescription to
compute the absorption of starlight by dust in stellar birth clouds and in the
ambient ISM in galaxies. We compute the spectral energy distribution of the
power reradiated by dust in stellar birth clouds as the sum of three
components: a component of PAHs; a mid-IR continuum characterising the emission
from hot grains; and a component of warm grains in thermal equilibrium with
adjustable temperature. In the ambient ISM, we fix for simplicity the relative
proportions of these three components to reproduce the spectral shape of
diffuse cirrus emission in the Milky Way, and we include a component of cold
grains in thermal equilibrium with adjustable temperature. Our model can be
used to derive statistical constraints on the star formation histories and dust
contents of large samples of galaxies using UV, optical and IR observations. We
illustrate this by deriving median-likelihood estimates of the star formation
rates, stellar masses, effective dust optical depths, dust masses, and relative
strengths of different dust components of 66 well-studied nearby star- forming
galaxies from the Spitzer Infrared Nearby Galaxy Survey (SINGS). From this
analysis, we conclude that the mid- and far-IR colours of galaxies correlate
strongly with the specific star formation rate, as well as with other
galaxy-wide quantities connected to this parameter. Our model can be
straightforwardly applied to interpret UV, optical and IR spectral energy
distributions from any galaxy sample. [abridged]
