Context: Dust reprocesses about half of the stellar radiation in galaxies. The thermal re-emission by dust of absorbed energy is considered driven merely by young stars and, consequently, often applied to trace the star formation rate in galaxies. Recent studies have argued that the old stellar population might anticipate a non-negligible fraction of the radiative dust heating. Aims: In this work, we aim to analyze the contribution of young (< 100 Myr) and old (~ 10 Gyr) stellar populations to radiative dust heating processes in the nearby grand-design spiral galaxy M51 using radiative transfer modeling. High-resolution 3D radiative transfer (RT) models are required to describe the complex morphologies of asymmetric spiral arms and clumpy star-forming regions and model the propagation of light through a dusty medium. Methods: In this paper, we present a new technique developed to model the radiative transfer effects in nearby face-on galaxies. We construct a high-resolution 3D radiative transfer model with the Monte-Carlo code SKIRT accounting for the absorption, scattering and non-local thermal equilibrium (NLTE) emission of dust in M51. The 3D distribution of stars is derived from the 2D morphology observed in the IRAC 3.6 {mu}m, GALEX FUV, H{alpha} and MIPS 24 {mu}m wavebands, assuming an exponential vertical distribution with an appropriate scale height. The dust geometry is constrained through the far-ultraviolet (FUV) attenuation, which is derived from the observed total-infrared-to-far-ultraviolet luminosity ratio. The stellar luminosity, star formation rate and dust mass have been scaled to reproduce the observed stellar spectral energy distribution (SED), FUV attenuation and infrared SED. (abridged)