The interstellar medium (ISM) contains the gas that fuels star formation as well as accretion onto supermassive black holes (SMBHs) in galaxies. As such the ISM is a key piece in the puzzle of galaxy formation and evolution: how and when did the first galaxies and their SMBHs form, and what physical processes regulate the star formation rate and black hole accretion? Finding the answers to these fundamental questions constitute the overarching challenge for extragalactic atronomy in the years to come, and will require characterizing in detail the microscopic (e.g. densities, temperatures, abundances) and macroscopic (e.g. star formation, morphology, kinematics) physical properties of the ISM in galaxies across cosmic time - from the first proto-galaxies emerging less than one billion years after the Big Bang to starburst galaxies in our cosmic backyard. The Atacama Large Millimeter Array (ALMA), the Extended Very Large Array (EVLA) and the recently launched Herschel Space Telescope are major facilities specifically designed to study the gas and dust content in galaxies, and in this talk I will outline how they, each in their own unique way, will have a ground-breaking impact on this endeavour.