Caffeine doesn't cause infertility. Many studies have been done to see whether there is a connection between caffeine and fertility, but no study that has been done and replicated has shown such a connection.
Some studies have shown that drinking large quantities of coffee (over 6 cups a day) may raise the risk of miscarriage. To be on the safe side, the FDA recommendation, like most studies I have read, is to reduce caffeine intake to 1-2 cups a day both while trying to conceive and during pregnancy.