This article is from the Impotence FAQ, by Sine Nomine firstname.lastname@example.org with numerous contributions by others.
The most common culprits seem to be blood-pressure medications,
tricyclic antidepressants, anxiolytics, antipsychotics,
anti-parkinsonian drugs, antihistamines, and hormonal (such as
thyroid) medications, but many drugs can interfere with erections. If
you suspect that your Erectile Dysfunction is caused by a medication
you're taking, check the side-effects listing in the Package
Insert/Patient Information that came with the medication (you can get
this from your pharmacist) and consult your doctor about switching to
another type of medication.