Connecting the Chemical Composition of Planetary Atmospheres with Planet Formation