We describe improved modelling of the emission by dust in a toroidal--like structure heated by a central illuminating source within Active Galactic Nuclei (AGN). We chose a simple but realistic torus geometry, a flared disc, and a dust grain distribution function including a full range of grain sizes. The optical depth within the torus is computed in detail taking into account the different sublimation temperatures of the silicate and graphite grains, which solves previously reported inconsistencies in the silicate emission feature in type-1 AGN. We exploit this model to study the spectral energy distributions (SEDs) of 58 extragalactic (both type-1 and type-2) sources using archival optical and infrared (IR) data. We find that both AGN and starburst contributions are often required to reproduce the observed SEDs, although in a few cases they are very well fitted by a pure AGN component. The AGN contribution to the far-IR luminosity is found to be higher in type-1 sources, with all the type-2 requiring a substantial contribution from a circum-nuclear starburst. Our results appear in agreement with the AGN Unified Scheme, since the distributions of key parameters of the torus models turn out to be compatible for type-1 and type-2 AGN. Further support to the unification concept comes from comparison with medium-resolution IR spectra of type-1 AGN by the Spitzer observatory, showing evidence for a moderate silicate emission around 10 mums which our code reproduces. From our analysis we infer accretion flows in the inner nucleus of local AGN characterized by high equatorial optical depths ($A_Vsimeq 100$), moderate sizes ($R_{max}<100 pc$) and very high covering factors ($fsimeq 80$ per cent) on average.