Can I hook up a water pump directly to DC-DC converter after solar panel?
I think the biggest problem is that solar panel may emit too much output.
Here is a datasheet of a random 24V 20W panel: https://www.amazon.com/GudCraft-24-Volt-Watt-Solar-Panel/dp/B004Z8IUN2 . It says:

Voltage at Power Max: 35.2 Volts
Open Current Voltage: 42.2Volts


If you have enough sun, the panel may output as high as 40 volt, and your DC/DC converter will break (and then, possibly, your motor will break too). You need a DC/DC converter with higher input range. 

The second problem is what happens when there is not enough sun. The other answer from Olin covers it pretty well -- the motor may overheat. Note that you may be able to buy pre-made undervoltage circuit from ebay instead of making it yourself. Or, since it is likely to be more expensive that the motor, you may want to just risk it and see it the motor will work anyway.