In solid KCl, the ions are held together by strong electrostatic forces. These forces prevent the ions from moving, so the compound cannot conduct electricity. When KCl is dissolved in water, the water molecules surround the ions and break apart the electrostatic forces. This allows the ions to move freely, and the compound becomes a good conductor of electricity.
The same thing happens when KCl is melted. The heat from the melting process breaks apart the electrostatic forces between the ions, allowing them to move freely and conduct electricity.
The difference in conductivity between solid and molten KCl is due to the difference in the mobility of the ions. In the solid state, the ions are immobile and cannot conduct electricity. In the molten state, the ions are mobile and can conduct electricity.