Heat energy is needed to melt a solid because heat energy increases the kinetic energy of particles, which is sufficient enough to break the attraction or bond between the particles and they start moving faster. As a result, there is a change in the state of matter from solid to liquid.
This heat energy is called latent heat of fusion.