All floats feedback a rounded down integer
You already got a couple of perfectly good answer. I will nevertheless
suggest a slightly different idiom:

float voltage = sensorVal * (5.0 / 1024);


or, maybe better:

const float V_REF = 5.0;  // at the top of the sketch

float voltage = sensorVal * (V_REF / 1024);


The reason this is slightly better than the other options is because
division –&nbsp;even integer division&nbsp;– is a very expensive
operation on the smaller Arduinos. By writing the conversion as in the
lines above, the ratio V_REF / 1024 becomes a compile-time constant,
which is evaluated by the compiler at build time. Then, only the much
cheaper multiplication needs to be done by the Arduino itself, at run
time. Not a big deal if you are not time constrained, but it's a
low-hanging fruit in terms of optimization.

You may write 1024.0 instead of 1024 if it feels safer. I tend to
keep the .0 for the voltage only, because 1024 is an integer, whereas
the “5” in “5&nbsp;volts” is conceptually a real number (it's an
analog voltage, and not even exactly 5&nbsp;V if you bother to measure
it). But this is just a personal preference at the end.