Viagra and Cialis proved once and for all that testosterone has little or nothing to do with erectile dysfunction, right? You just take a little pill and then everything works out in the bedroom again, correct?
Wrong! This has proven decidedly NOT to be the case and one (of many) key reasons is that taking Viagra or Cialis does not address the key issue of low testosterone that often plagues middle-aged males. Yes, Viagra and Cialis will boost endogenous nitric oxide levels, but that simply isn't enough when a man does not have satisfactory baseline testosterone levels.
Below are several critical ways that low testosterone sabotages your erections:
1. Nitric Oxide. Viagra affects the NOS (Nitric Oxide Synthase) enzyme, allowing nitric oxide to essentially persist longer. However, what some researchers and physicians seemed to have forgotten is that NOS is strongly affected by testosterone. For example, castrated rats lose about half of their penile NOS activity.  And the only way to restore the rat's "hardness factor?" Give them testosterone!  You are definitely swimming upstream with low testosterone.
2. Internal Penile Atrophy. Nerves, connective tissue and other internal structures within the penis begin to atrophy and harden in a low testosterone environment. If this goes on too long, it can result in Venous Leakage, a condition where blood leaks out of the penis as quickly as it goes in, making erections less and less firm as time goes on.
3. Pelvic Floor Musculature. The muscles at the base of penis are packed with androgen receptors. These muscles naturally wither without adequate testosterone levels. This is yet another reason why Kegels can often help men.
4. Morning Erections. Morning erections are critical for penile health and experts believe that the lack of them can contribute to erectile dysfunction. Researchers believe that the internal tissues are oxygenated during this critical time while you are sleeping. Reseachers have found that if your testosterone gets low enough, morning erections can diminish or even vanish altogether. 
5. Libido. It is no secret that testosterone and libido go together.  I cannot tell you the number of emails that I have received from men who have lost interest in sex altogether and, of course, they almost always have low testosterone levels. Low libido can lead to many erectile issues, since it can strain relationships, dulls desire and leads to decreased sexual activity and erections.
6. Mood and Depression. Testosterone has a monumental effect on the male brain and many studies have shown that low levels lead to depressive (and other related) symptoms.  This can create a vicious cycle as depression, in turn, can lower testosterone.
So, as always, the bottom line is get tested if you have any Symptoms of Low Testosterone and/or symptoms of erectile dysfunction - one root cause could definitely be hormonal. And here's a teaser for my new book as well: if you want to know the exact levels at which testosterone and erectile dysfunction collide, including surrounding issues such as morning erections and venous leakage, please check out Low Testosterone By The Numbers for further details.
1) Fertil Steril, 1995 May, 63(5):1101-7, "The effect of androgen on nitric oxide synthase in the male reproductive tract of the rat"
2) Int J Impot Res, 1995 Dec, 7(4):209-19, "Nitric oxide mediated erectile activity is a testosterone dependent event: a rat erection model"
3) Journal of Andrology, 18(5):522-527, "Relationship between sleep-related erections and testosterone levels in men"
4) The Journal of Clinical Endocrinology & Metabolism, Jul 1 2006, 91(7):2509-2513, "The Relationship between Libido and Testosterone Levels in Aging Men"
5) Asian Journal of Andrology, 2010, 12:136 151, "Androgens and male aging: current evidence of safety and efficacy"