Most prostate cancer treatments involve destroying the cells of the prostate gland (both normal and cancerous). In the process of killing or removing the prostate tissue, the surrounding structures are often damaged as well.
Immediately adjacent to the prostate, there are a number of small but very important nerves and blood vessels. These nerves and blood vessels supply the penis and are essential for proper erectile function. When damage to these structures occurs because of surgery, radiation, or another prostate cancer treatment, they do not work as well, and erectile dysfunction results.
In the case of surgery, the nerves or blood vessels are simply cut or nicked during surgery. With radiation therapy, the cells that make up the nerves and blood vessels are killed directly or scar tissue forms later on, which obstructs or compresses the nerves and blood vessels.
In the case of hormone therapy, the decreased levels of circulating male hormones, such as testosterone, can result in several side effects, including erectile dysfunction.