So what does your weight have to do with your erections? Everything it turns out. I often get emails from men who are 40+ pounds overweight and are looking for a miracle supplement or pill to help with their erectile dysfunction. Below we'll show the research that shows the answer lies around their waistline.
In fact, few men really understand just what a profound difference losing weight can have on their sex life. Let's start with just some of the research that shows what weight loss can do to your testosterone and, of course, testosterone is one of the keys to erectile strength. One study of men with abdominal obesity showed that dropping about 35 pounds led to a 15 percent increase in free testosterone and significant increases in total testosterone as well too. 
These numbers just show the tip of the iceberg though. Another study looked at a broader sample of obese men and then followed them as they lost even more weight than the above study - between about 60 and 280 pounds - and found very significant changes in T. Total testosterone levels climbed from an average of 240 to 377, a very significant 58% increase. Free testosterone was boosted by 41% as well. (Free estrogen also decreased.)
NOTE: Remember that cutting back on calories more than about 15% from your baseline can actually reduce testosterone levels, at least in the short term. So, in general, you probably want to lose weight gradually. Talk to your physician.
So what will raising your testosterone this much do for you? As you hopefully know from looking around this site, increasing testosterone will increase libido, help with venous leakage and increase nitric oxide levels. Not bad, eh?
The benefits in dropping those pounds go far beyond just changes in testosterone levels, however. Losing weight dramatically alters your inflammation profile. One study showed that for every 1 kg (2.2 pounds) lost, CRP (C-Reactive Protein) levels lowered by 0.13.  And, as I document in this link on Inflammation and Erectile Dysfunction, CRP is a risk factor for both heart disease and erectile dysfunction.
Those extra pounds also increase another inflammatory cytokine, tnf alpha. Many studies have shown that it is macrophages communicating within fat that actually increase tnf-alpha levels and, tnf alpha, if you'll recall, is the deadly molecule that is the root cause of many cancers, arteriosclerosis and various auto-immune diseases. It doesn't get much nastier and that spare tire around your middle is literally "food" for tnf alpha. Every extra bite you take feeds this three-headed monster and studies show that if you are significantly overweight, you want to lose at least 10% of body weight to substantially reduce those inflammatory markers. 
By the way, the increased weight and tnf alpha also increases insulin resistance. And insulin resistance, over time, becomes the hallmark symptom of Metabolic Syndrome, which I have renamed Erectile Dysfunction Syndrome, because of how hard it is on your erections.
Does this mean dropping pounds can help? One study of obese, diabetic men showed that even losing 5% of body weight significantly improved both libido and sexual function.  And what if you lose even more weight? Here the results can be dowright astonishing. A one year study of obese men without major health issues such as hypertension or diabetes found significant improvements in erectile dysfunction with exercise and weight loss of 10% of body weight.  
And one study that categorized men into categories according to their BMI found clearly that the more overweight, then 1) the lower the testosterone and 2) the greater the erectile dysfunction.  Again, there are many health ways to lose weight and many keys to doing the same. Just go to the Search link at the top of any page on this web site and type in "weight" and you'll find many helpful links.
1) Diabetes, Obesity and Metabolism, May 2004, 6(3):208â€“215, "Changes in sex hormone-binding globulin and testosterone during weight loss and weight maintenance in abdominally obese men with the metabolic syndrome"
2) The Journal of Clinical Endocrinology & Metabolism, May 1 1988,66(5):1019-1023, "Effect of Massive Weight Loss on Hypothalamic Pituitary-Gonadal Function in Obese Men"
3) Am J Physiol Endocrinol Metab, 2007 Sep, 293(3):E713-25, "Macrophage TNF-alpha contributes to insulin resistance and hepatic steatosis in diet-induced obesity"
4) Comparing Effects of a Low-energy Diet and a High-protein Low-fat Diet on Sexual and Endothelial Function, Urinary Tract Symptoms, and Inflammation in Obese Diabetic Men. The Journal of Sexual Medicine, 2011]
5) International Journal of Impotence Research, 2005, 17:391â€“398. "Obesity, the metabolic syndrome, and sexual dysfunction"
6) JAMA. 2004, 291(24):2978-2984, "Effect of Lifestyle Changes on Erectile Dysfunction in Obese Men"
7) Arch Intern Med, 2007, 167(1):31-39, "The Effect of Weight Loss on C-Reactive Protein"
8) Nutrition Research Reviews, 2008, 21, 117â€“13, "Obesity and in?ammation: the effects of weight loss"
9) J Sex Med, 2008, 5:2454â€“2463, "Low levels of androgens in men with erectile dysfunction and obesity" .