Bacterial vaginosis is a term used to describe a condition caused by many different kinds of bacteria, some of which can be transmitted sexually. This is not to say that it is always transmitted sexually. Many women who are immuno-compromised can be plagued with BV.
However, statistics show that it is more prevalent in sexually active women who have had multiple partners or whose partners have multiple partners. Men can be infected and asymptomatic as can women.
There seems to be controversy about how it is transmitted and the jury is still out.
Personally speaking, I had one partner who was either giving me an infection or his sperm was like Lye Soap and changing my environment and I got one evey time we were together. Since Mr Lye (that is a good name for him) I have a new beau and this is not happening, I am assuming that it is not because my immune system is compromised. Here are a few links.