Smoking is the best way I know of to put your sex life up in smoke - no pun intended. Yes, indeed, smoking and erectile dysfunction are married at the hip. In fact, I would go so far as to say that smoking is another example of an Anti-Viagra. It lowers Nitric Oxide, erection buddy #1, and constricts blood vessels.  I don't think I have to tell you that this is bad news for one's sex life and can lead to erectile dysfunction.
Smoking is also associated with heart disease and arteriosclerosis, so, rest assumed, it's not just taking out erections in the short term - those cigarrettes have a long term commitment as well. Yes, each and every light is helping to clog the arteries that supply blood to the penis as well.  One of the primary causes for this is that smoking increases insulin resistance and the likelihood of full-blown Metabolic Disorder.  Smoking also raises blood pressure, a leading risk factor for heart disease.  Studies also show that it also raises bad cholesterol, lowers good cholesterol  and leads to more arterial plaques. Pulse rates are also elevated in smokers. Smoking is just plain nasty on your arteries and Peak Testosterone readers know that anything that effects your arteries will eventually lead to erectile dysfunction of one degree or another.
All of these cardiovascular and endothelial issues add up to a big bedroom train wreck waiting to happen and is undoubtedly why smoking has in a number of studies been associated with erectile dysfunction.  In fact, smoking is so nasty that there is even some evidence that long term exposure to second hand smoke can lead to erectile dysfunction!  Of course, this means that male smokers may not only be giving themselves erectile dysfunction but propogating among their close friends and family.
If you are smoker, you should also realize that the damage is cumulative and gradual. Some smokers think, "Well, I have smoked for ten years so there is no point in stopping now. My fate is sealed." One large scale study, cited above, found that "an association between smoking and ED and supports a dose-response relationship between cumulative pack-years of smoking and risk of ED".  This study actually calculated pack-years for the participants, i.e. the number of years times the number of packs per day, in order to gauge if more smoking led to more problems. What they found is that the longer one smokes a longer amount, the more likely the risk of erectile dysfunction.
Smoking also ages the skin and face, so not only are you likely to perform worse in the bedroom, but you'll look older and less attractive while you're doing it. For example, one study found that smoking significantly aged skin through loss of elasticity.  Only ego maniacs can help but be effected by changes in appearance and loss of self-confidence can contribute to erectile dysfunction.
Further loss of self-confidence can can from bad breath: a smoker's breath puts new meaning into the word halitosis. In fact, several studies - not too suprisingly I might add - have found that halitosis is associated with smoking. 
By the way, you may have heard that smoking raises both free and total testosterone.  While this is likely true in the short term, what good does a little boost in testosterone do when you have to live a life of cardiovascular disease and erectile dysfunction? Notice that increased testosterone should help with erectile dysfunction and yet smoking is so bad for one's erections that it completely overcomes this "positive".
Is there any good news in all of this? Definitely! I mentioned above that smoking is dose dependent, which means the sooner you quit the less damage you do. Furthermore, there is considerable evidence that smoking cessation actually partially reverses, or perhaps allows the body to self-heal, erectile dysfunction.  And example of this is that nflammation levels, a risk factor for erectile dysfunction, were found to return to normal about five years after quitting smoking.  Furthermore, the evidence shows that smoking cessation leads to decreased cardiovascular mortality on an ongoing basis  and after one's first heart attack as well. 
Again, the obvious lesson is that, if you are a smoker, you should quit and quit now. You can avoid, at least, future damage. And if you are a long term smoker, you can likely overcome most of the damage you have done to yourself with Exercise, Proper Diet and some initial Supplementation coupled with body's own natural restorative processes. Erectile dysfunction and impotence does NOT have to be your destiny.
So, if you smoke and won't quit because it may kill you from cancer or a heart attack, at least do it for the Little Guy...
NOTE: Cigar smokers should not think that they are immune to all of this: cigar smoking is associated with cardiovascular disease, cancer and COPD. 
NOTE: Smoking is also a risk factor for heartburn and GERD as well. 
1) Amer Journal of Epidemiology, Received March 15, 2005, Accepted July 7, 2005, "Endothelial Nitric Oxide Synthase (NOS3) Genetic Variants, Maternal Smoking, Vitamin Use, and Risk of Human Orofacial Clefts"
2) Journal of Investigative Dermatology, 2003, 120:548 554, "Effect of Smoking and Sun on the Aging Skin"
3) Amer Journal of Epidemiology, 1972, 95(1):17-25, "CIGARETTE SMOKING AND ARTERIOSCLEROSIS OBLITERANS: AN EPIDEMIOLOGIC APPROACH"
4) Atherosclerosis, 181(2):381-388, "Association between cigarette smoking, metabolic syndrome, and carotid arteriosclerosis in Japanese individuals"
5) Amer Journal of Epidemiology, 2005, 161(4):346-351, "Association between Smoking and Erectile Dysfunction: A Population-based Study"
7) European Urol, Aug 2007, 52(2):416 422, "Association between Smoking, Passive Smoking, and Erectile Dysfunction: Results from the Boston Area Community Health (BACH) Survey"
8) Archives of Gerontology and Geriatrics, May 2008, 46(3):307-316, "Factors associated with self-reported halitosis (SRH) and perceived taste disturbance (PTD) in elderly"
9) Cardiology, 1992, 81(4-5):233-237, "Cardiovascular Effects of Cigarette Smoking"
10) European Journal Clin Invest, Oct 1993, 23(10): 630-40, "Smoking and plasma lipoproteins in man: effects on low density lipoprotein cholesterol levels and high density lipoprotein subfraction distribution"
11) NEJM, Jun 10 1999, 340(23):1773-1780, "Effect of Cigar Smoking on the Risk of Cardiovascular Disease, Chronic Obstructive Pulmonary Disease, and Cancer in Men"
12) Intl Journal of Andrology, Nov 29 2006, 30(3):137-143, "Endogenous testosterone levels and smoking in men. The fifth Troms study"
13) Nature Reviews Urology, January 2005,"Smoking cessation improves erectile dysfunction"
14) PLoS, Jun 2005, 2(6):e160, "Smoking Cessation and Cardiovascular Disease Risk Factors: Results from the Third National Health and Nutrition Examination Survey"
15) Tob Control, 2010, 19:50-57, "The effects of smoking and smoking cessation on mortality from cardiovascular disease among Japanese: pooled analysis of three large-scale cohort studies in Japan"
16) Journal American College Cardiology, 2009, 54:2382-2387, "Smoking Status and Long-Term Survival After First Acute Myocardial Infarction"