A laser altimeter is operated from a plane, a helicopter or a satellite. It determines the distance to the [Planet's] surface by measuring the time-of-flight of a short flash of infrared laser radiation. The instrument emits laser pulses which travel to the surface, where they are reflected. Part of the reflected radiation returns to the laser altimeter, is detected, and stops a time counter which was started when the pulse was sent out. The distance is then easily calculated by taking the speed of light into consideration.

Using this technology one can build up a 3D visualization of a planets surface

The planet's crust is thicker in low latitudes and thinner at the poles, a distribution that suggests the planet could have a liquid outer core. Its core is also large relative to the planet, comprising 85 percent of the planet's radius, much more than Earth.

How did they come to this conclusion? This paper explains in depth.(The full version is free, but requires signing up to the site, signing up is also free and has no costs and has the ability for you to turn off receiving emails and newsletters from them)

The most notable part is this excerpt and image:

Resulting moment of inertia parameters for more than 1 million Monte Carlo models that include a silicate crust and mantle, as well as an Fe-rich core that may contain solid and liquid layers are shown in

(A) Outer radius of Mercury’s liquid core. (B) Average density of the solid shell that overlies the liquid core

Conclusion

Essentially, specific readings taken by a Laser Altimeter allow us to map out the three dimensional shape of a planets surface. Analysis of the shape shows us that the crust is thinner at the poles which is likely due to a liquid core.

On top of this, Mercury is believed to have a small magnetic field (1% of our own) and this might be due to a liquid outer core circulating a solid inner core, acting like a dynamo. Though there is still much speculation given over what causes the magnetic field so this is unreliable to use for a solid footing.

Aside from that there is the logical thought process that larger planets are capable of creating huge amounts of heat and pressure at their cores which create a molten core, or at least a molten layer. This is why there is much skepticism over Mercury because it is such a small planet that its core should have solidified long ago.