The Formation and Evolution of Habitable Worlds