Why are planets sphere shaped?

  All the planets of our solar system were formed out of the same cloud of gas and dust that gave rise to the Sun, some five billion years ago. As random collisions and gravitational forces compacted the gas and dust particles into the various planets, the heat generated brought the masses into a molten state. Since surface tension of a liquid tends to make the surface area minimum and the sphere has the minimum surface area for a given volume, all the planets in the molten state became spherical and have retained that shape as they cooled.