Yes, anxiety can cause impotence. Anxiety is associated with the activation of the fight or flight response. With this activation, it diverts resources away from non-essential systems (reproductive system and digestive system) to the essential systems for survival (muscles, heart, lungs, brain). So when you are anxious, your reproductive system shuts down, and you become impotent due to lack of sexual arousal and lack of desire.
Another way anxiety can cause impotence is if you have performance anxiety related to sex. So let's say you are going to be intimate with your partner. But you have thoughts that your partner will make fun of you, or that you will embarass yourself, or that your partner will not like you. With these thoughts, it makes you anxious. This anxiety then makes you impotent due to the activation of the fight or flight response as described above. The anxiety also makes you want to avoid having sex with your partner, which maintains your belief that your partner is making fun of you. Thus, the vicious, negative cycle of sexual perfomance anxiety continues.
For more information and help on performance anxiety, please visit the rest of AnxietyBoss.com.