We investigate the evolution of interstellar dust in the Universe by means of chemical evolution models of galaxies of different morphological types, reproducing the main observed features of present day galaxies. We adopt the most updated prescriptions for dust production from supernovae and asymptotic giant branch (AGB) stars as well as for dust accretion and destruction processes. Then, we study the cosmic dust rate in the framework of three different cosmological scenarios for galaxy formation: i) a pure luminosity scenario (PLE), ii) a number density evolution scenario (DE), as suggested by the classical hierarchical clustering scenario and iii) an alternative scenario, in which both spirals and ellipticals are allowed to evolve in number on an observationally motivated basis. Our results give predictions about the evolution of the dust content in different galaxies as well as the cosmic dust rate as a function of redshift. Concerning the cosmic dust rate, the best scenario is the alternative one, which predicts a peak at 2 < z < 3 and reproduces the cosmic star formation rate. We compute the evolution of the comoving dust density parameter Ω dust and find agreement with data for z < 0.5 in the framework of DE and alternative scenarios. Finally, the evolution of the average cosmic metallicity is presented and it shows a quite fast increase in each scenario, reaching the solar value at the present time, although most of the heavy elements are incorporated into solid grains, and therefore not observable in the gas phase.