Planets are round because of its gravitational field. As a planet gets massive enough, internal heating takes over and the planet behaves like a fluid. Gravity then pulls all of the material towards the center of mass (or core). Because all points on the surface of a sphere are an equal distance from the center of mass, planets eventually settle on a spherical shape. For major planets, one of the requirements is that it's large enough for it's gravity to pull it into a sphere. Though, even for small asteroids and such, it's not uncommon for these bodies to be "roundish" (though, they are often oval shaped).
It is interesting to note though that, because planets rotate, they aren’t perfect spheres and actually bulge out at the equator.
In the case of a cube, the corners are further away from the center of mass than the rest of the cube. Especially for objects as massive as a planet or a star, the corners would collapse under their own weight and the object would take on a spherical shape. As cool as a cubical planet would be, they simply can’t exist. Well, correction, a cubic planet could probably be engineered by a civilization bent on assimilating all life in the galaxy, but the point is a square planet won't form without outside help.