The Coevolution of Galaxies and Their Environments