We present a self-consistent model of the spectral energy distributions (SEDs) of spiral galaxies from the ultraviolet (UV) to the mid-infrared (MIR)/far-infrared (FIR)/submillimeter (submm) based on a full radiative transfer calculation of the propagation of starlight in galaxy disks. This model predicts not only the total integrated energy absorbed in the UV/optical and re-emitted in the infrared/submm, but also the colours of the dust emission based on an explicit calculation of the strength and colour of the UV/optical radiation fields heating the dust, and incorporating a full calculation of the stochastic heating of small dust grains and PAH molecules. The geometry of the translucent components of the model is empirically constrained using the results from the radiation transfer analysis of Xilouris et al. on spirals in the middle range of the Hubble sequence, while the geometry of the optically thick components is constrained from physical considerations with a posteriori checks of the model predictions with observational data. Following the observational constraints, the model has both a distribution of diffuse dust associated with the old and young disk stellar populations as well as a clumpy component arising from dust in the parent molecular clouds in star forming regions. In accordance with the fragmented nature of dense molecular gas in typical star-forming regions, UV light from massive stars is allowed to either freely stream away into the diffuse medium in some fraction of directions or be geometrically blocked and locally absorbed in clumps. These geometrical constraints enable the dust emission to be predicted in terms of a minimum set of free parameters: the central face-on dust opacity in the B-band τfB, a clumpiness factor F for the star-forming regions, the star-formation rate SFR, the normalised luminosity of the old stellar population old and the bulge-to-disk ratio B/D. We show that these parameters are almost orthogonal in their predicted effect on the colours of the dust/PAH emission. In most practical applications B/D will actually not be a free parameter but (together with the angular size θgal and inclination i of the disk) act as a constraint derived from morphological decomposition of higher resolution optical images. This also extends the range of applicability of the model along the Hubble sequence. We further show that the dependence of the dust emission SED on the colour of the stellar photon field depends primarily on the ratio between the luminosities of the young and old stellar populations (as specified by the parameters SFR and old) rather than on the detailed colour of the emissions from either of these populations. The model is thereby independent of a priori assumptions of the detailed mathematical form of the dependence of SFR on time, allowing UV/optical SEDs to be dereddened without recourse to population synthesis models. Utilising these findings, we show how the predictive power of radiative transfer calculations can be combined with measurements of θgal, i and B/D from optical images to self-consistently fit UV/optical-MIR/FIR/submm SEDs observed in large statistical surveys in a fast and flexible way, deriving physical parameters on an object-by-object basis. We also identify a non-parametric test of the fidelity of the model in practical applications through comparison of the model predictions for FIR colour and surface brightness with the corresponding observed quantities. This should be effective in identifying objects such as AGNs or star-forming galaxies with markedly different geometries to those of the calibrators of Xilouris et al. The results of the calculations are made available in the form of a large library of simulated dust emission SEDs spanning the whole parameter space of our model, together with the corresponding library of dust attenuation calculated using the same model.