One could assume the 36V version has longer windings (larger number of turns) of thinner wire, than the 24V version.
Net effect is, you get the same torque with less current, but need more voltage to do so. So between the two motors, you can choose whether to have larger U smaller I, or smaller U larger I. Basic Ohm's law apply. Just like you can buy 230V or 115V products and both perform roughly the same.
Assuming the power rating is the same, torque rating likely is too, and the two motors likely have similar amount of copper and iron in them. If this is so (i.e., they are truly different voltage versions of otherwise same design), neither is better or worse, choose based on your available battery voltage.
Remember you can have larger battery voltage than the motor nominal voltage, it does no harm (within moderation). The maximum voltage is defined by the components used in the motor controller circuit. Motor nominal voltage is useful so you know the minimum battery voltage you want to have to get the rated performance.
350W motor obviously produces more power than the 250W motor. If they are both rated to produce the same RPM under this nominal power, it must then mean the 350W motor produces more torque.
Just like power = voltage times current, power is also rotational speed times torque. Motor voltage is in proportion to RPM, motor current in proportion to generated torque.