Why does liquid space propellant make a good engine coolant? I was researching the regeneratively cooled nozzle and combustion chamber on the Merlin 1D when I found this out. I do know that the pipes are built around the combustion chamber and nozzle, but don’t know how it gets cooled by the propellant.
Really, there is nothing particularly special about it.
Any liquid flowing through pipes in the engine wall will carry heat away from the engine as it heats up. Obviously, some liquids will be more effective than others. (Also, some propellants won't work because they'll either clog the pipes or explode, but RP-1 is especially formulated to avoid this).
With rockets, however, you can then burn the heated-up propellant in the engine, which saves energy since the heat lost to cooling isn't wasted. This also (more importantly) saves you from needing a separate supply of coolant and a huge radiator to get rid of the heat.
The volumetric heat capacity of liquids is much higher than that of gases. You need much more energy to heat a certain volume of water than the same volume of air. The density of liquids is much bigger than that of gases, that is why they can transport much more heat energy.
Therefore a liquid flowing through a pipe takes away much more heat than a gas flowing through the same pipe at the same speed.
To cool the combustion chamber, the liquid fuel flowing through the pipes takes away the heat and gets warmer. It should get not too warm so it remains a liquid without gas bubbles.
Because it's 'free' energy for the taking!
In a rocket, you have liquid fuels that need to be vaporized to burn correctly. To vaporize a liquid, you need to add heat energy to it: specifically its latent heat/enthalpy of vaporization, which is quite considerable. The enthalpy causes zero practical temperature increase: the substance is still the same temperature; it's just now vapor instead of liquid.
If you do nothing else (say you have external cooling of the nozzle), this enthalpy must come from the fire in the combustion chamber. That is, the enthalpy of vaporization is "stealing" energy that would otherwise be used for thrust. Stolen energy is a big deal; the Rocket Equation is harsh.
Think of the heat in an automobile. Sure, they could have the engine spin a generator and make resistive electric heat, but that would burden the engine. The engine's radiator is already throwing away waste energy from engine cooling... that's free. No impact on fuel economy or performance.
Therefore, even if the nozzle was made of indestructium... the opportunity to get "free energy" by cooling the engine nozzle is a win for efficiency. By adding heat to the fuel or oxidizer there, it will require less enthalpy of vaporization when it gets to the combustion chamber, and that means more thrust. For free.
How to capture that energy, without boiling the "coolant"
Mind you, having it turn to vapor in the nozzle cooling jacket would be a huge problem.
But we have something working in our favor. There are high-pressure pumps which raise the fuel and oxidizer from the native pressure in the rocket's tanks to a much higher pressure for injection into the combustion chamber. Raising a liquid's pressure also raises its boiling point. So this pressurization lets you add energy to the fuel/coolant without it boiling in the pipes.
So the pressurization helps you "get ahead" of enthalpy, by letting you preload some of the enthalpy into the pressurized fuel.
Just two short comments on the other excellent answers:
Wall cooling is not free: What happens is that you (can) have a significant reduction in chamber pressure (depending on chamber size), reducing your thrust and efficiency. There may also be some second order effects on combustion efficiency when heat is removed from the process. So if we could run an engine with adiabatic walls, it could absolutely be advantageous.
Supercritical fluids don't boil: Furthermore, all current rocket engines operate at chamber pressures exceeding their propellant critical pressures. As the pressurization occurs before entering the cooling channels, strictly 'vaporization' cannot occur at supercritical pressures, as there is no boiling point anymore. However, at near-critical pressures, something similar may occur, 'pseudo boiling', with similar outcome.
[edit: address some comments from organic marble]
The speed at which heat is transferred from a surface depends on the transfer capacity of whatever is touching its surface and the speed at which it is taking that heat away from the surface thus making a heat gradient that pulls more heat out of the surface faster.(that's as simple as I could put it without fancy technical words)
Rocket fuels that are commonly used have good heat transfer properties and they are liquid so they can be pumped very quickly off of a hot surface thus taking the heat away with them, this serves to pre-heat the fuel fur combustion lowering the fuel wastage as well.