We present a time-dependent radiative model of the atmosphere of HD209458b and investigate its thermal structure and chemical composition. In a first step, the stellar heating profile and radiative timescales were calculated under planet-averaged insolation conditions. We find that 99.99% of the incoming stellar flux has been absorbed before reaching the 7 bar level. Stellar photons cannot therefore penetrate deeply enough to explain the large radius of the planet. We derive a radiative time constant which increases with depth and reaches about 8 hr at 0.1 bar and 2.3 days at 1 bar. Time-dependent temperature profiles were also calculated, in the limit of a zonal wind that is independent on height (i.e. solid-body rotation) and constant absorption coefficients. We predict day-night variations of the effective temperature of ~600 K, for an equatorial rotation rate of 1 km/s, in good agreement with the predictions by Showman &Guillot (2002). This rotation rate yields day-to-night temperature variations in excess of 600 K above the 0.1-bar level. These variations rapidly decrease with depth below the 1-bar level and become negligible below the ~5--bar level for rotation rates of at least 0.5 km/s. At high altitudes (mbar pressures or less), the night temperatures are low enough to allow sodium to condense into Na2S. Synthetic transit spectra of the visible Na doublet show a much weaker sodium absorption on the morning limb than on the evening limb. The calculated dimming of the sodium feature during planetary transites agrees with the value reported by Charbonneau et al. (2002).