The giant planets formed in a drastically different environment from the terrestrial planets. It was much colder in the outer solar system, so water was ice, but in the region near where Earth formed, water turned to steam. Water is one of the most common chemical compounds, and its ice form accretes much more easily. This encouraged the outer planets to grow massive. Astronomy magazine subscribers can read the full answer for free. Just make sure you're registered with the website.