Yes, certain lifestyle factors can affect fertility. Smoking, excessive alcohol consumption, drug use, obesity, poor nutrition, and exposure to environmental toxins can all contribute to infertility in both males and females.