As the planets formed through the accretion of planetesimals, they heated due to the violence of the collisions. How violent were these collisions? We can easily estimate the amount of energy available. Suppose that I let a planetesimal accrete onto an object of mass M and radius R.
As the object falls toward the planet, it gains speed (kinetic energy). If the planetesimal starts to fall very far from the planet and is initially at rest, by the time it hits the planet, it will have accelerated to the escape speed of the object (hmmm?).
The escape speeds for the planets are roughly 2.6, 6.4, 6.9, 1.4, and 3.1 miles/second for Mercury, Venus, Earth, the Moon, and Mars, respectively.
Now, what happens to this energy when the planetesimal hits the planet?
Because the surface of the planet is hard, the planetesimal comes to a halt and the energy is converted into heat and the planet heats up. In order to gauge whether the heat added to the planet is significant, we need to consider whether the heat will melt the planet's rocks.
For accretion onto the Earth, where the escape speed is 6.9 miles per second, and for a typical silicate rock, the answer is yes; the heat released can melt rocks. In fact, for every gram of material accreted there is enough energy to melt more than 100 grams of silicate rocks.
The amount of energy needed to melt silicate rocks at a one-to-one rate is provided by accretion onto a planet where v(esc) = 0.69 miles per second, that is, all of the Terrestrial planets are capable melting by the accretion of planetesimals.