Voltage regulator or DC/DC converter

You are right. To a first approximation the 7805 regulator's efficiency is Vout/Vin, or in your case 5/24 = 20.8%.

You also have to be concerned with maximum current draw. The actual power dissipation of the regulator is (Vin-Vout)*Iout = (24-5)Iout = 19Iout. This total power dissipation heats up the regulator and if it gets hot enough, it shuts down. My rule of thumb is to keep power dissipation <1W for TO-220 packages. This would limit your current to about 50mA, enough for the Arduino circuitry but not much else.

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected