How does a guy know if his sperm are any good for making a baby?

Impregnating partner. This is the ultimate test. Is making her pregnant. Semen analysis can tell you whether or not you sperm are likely to be good for making a baby. Pregnancy is definitive.
Semen analysis. A routine semen analysis ('sperm count') is the only clear way to know. Personal history and symptoms may be helpful additions but are not at all reliable by themselves.