There are several differences between the words impotence and erectile dysfunction. Erectile dysfunction is a relatively new word, a medical diagnosis that refers to a prolonged and consistent inability to get or maintain an erection that allows for sexual activity. Impotence is a very old word with multiple meanings, including being weak, powerless, and lacking in sexual power or ability.
Neither word is "bad," but in the context of sexual health, when the goal of using language is to help people struggling with a sexual problem, the word erectile dysfunction is not only preferable to impotence, but in almost all cases it should be used instead of impotence.
What's wrong with impotence? The two biggest problems, and best reasons to stop using the term, are that it is vague and judgmental. Early use of impotence to describe a sexual problem (which date back to the mid-1600s) didn't refer only to erectile difficulties. Impotence referred to a generalized lack of sexual power, which may have been an inability to get or keep an erection, but also may have referred to lack of sexual drive or libido. Being vague or overreaching may be useful in literature, but when it comes to diagnosing and treating complaints, the more specific we can be, the better. These days, impotence (which is still used in some medical spheres) has come to mean essentially the same thing as erectile dysfunction, making it vague and now redundant.
Impotence is a judgmental or loaded term because it connects an inability to get an erection with both a lack of general power and an inability to give or receive pleasure. If a man can't get an erection, he's of no use. These implications are false. A man's sexual power does not rest solely in his ability to get an erection, and men regularly have enjoyable sex that doesn't involve their penis.
Erectile dysfunction, while obviously a more clinical term, is useful precisely because what is called for in this context is a clinical term. Erectile dysfunction describes what is happening; a man isn't getting erections when he wants or how he used to. An inability to get an erection may or may not be related to issues of power in a relationship or pleasure in a sexual encounter. When discussing sexual health for the purpose of helping people who are struggling with a problem, it is preferred to use language that does not impose an individual or universal meaning, unless we are using the word to describe ourselves or our own experience.
Impotence is a powerful word, but as a medical or therapeutic term, it has become dated and more problematic than useful, particularly as sex therapists and researchers develop more precise language to address sexual dysfunction. In any sexual health context, the term erectile dysfunction would be preferable to impotence.