Smoking makes it harder to get and maintain an erection because it releases adrenaline and other stimulating compounds that clamp down on the flow of blood to the penis. Less blood means weaker erections and erections more likely to fail. (Maybe that's why people often smoke after making love -- doing so beforehand can put a damper on things.) In studies of erectile dysfunction, smoking consistently ranks as one of the biggest modifiable risk factors.
Smoking may also hurt a man's ability to father children. Several studies show that men who smoke have lower sperm counts, on average, and their sperm are somewhat more likely to be abnormally shaped. Both of these factors lower a man's fertility; so if you're trying to have kids, try to kick the habit first.