LH2 has several nice properties that make it the propellant of choice.
One, it releases a lot of energy when combusted with oxygen; this is obviously one of the most important factors in a rocket fuel.
Two, the molecular weight of both the fuel and its combustion product is low, which yields high exhaust velocity, which is directly proportional to specific impulse, the fuel-efficiency of a rocket. Obviously hydrogen is going to be a winner here.
Three, the combustion product of LH2/LOX is mostly friendly, non-toxic water vapor; any unburned fuel or oxidizer is also relatively harmless.
On the down side, the low density of LH2 means that your fuel tanks are much bigger than they would be for kerosene/LOX, and you have to keep LH2 very cold; it's impractical to store it in the rocket's tanks for any substantial length of time.
If you can't afford the volume of LH2 (like in the already-enormous first stage of Saturn V) you go with RP-1 (kerosene)/LOX instead, which is almost as powerful and convenient; the combustion products include a lot of relatively-harmless CO & CO2 in addition to water vapor.
If you need to keep the rocket fueled for long periods of time - like in an ICBM that has to launch in a hurry - then LOX isn't practical, and you start having to get into room-temperature fuels like the hydrazine family of fuels with N2O4 oxidizer, which are toxic in both raw and combusted forms.
Everything else tends to fall short of LH2 or kerosene in safety, stability, convenience, performance, or all of the above.
So those are the factors for the majority of conventional launchers.
There's growing interest in methane/LOX for Mars return missions, since it's theoretically possible to produce methane for the return trip on the surface of Mars. The specific impulse is in the same ballpark as kerosene or a bit better.
If overall thrust isn't a factor, as for upper stages, ion engines using Xenon as reaction mass have vastly higher ISP but terribly low thrust; it takes them a long time to leave Earth's orbit to go anywhere.