Bad seems to be a frequent component of German place names (e.g. Bad Bergzabern, Bad Doberan, Bad Schandau ...) Why is this, and what is the meaning of Bad in this context?
German towns can participate in a certification process to allow to carry a rating as Bad in their town name.
By German federal law strict prerequisites have to be met by an applicant, e.g.:
- presence of certain scientifically proven healing substances in the soil (like minerals, salts, radiation or the like)
- regularly analyzed healthy climate
- institutions that offer certain therapies or wellness facilities
- some characteristics usually found in these towns (e.g. a town hall, parks)
- scientifically acknowledged therapies and medical doctors who offer these treatments
So in summary a town prefixed by Bad is a certified spa.
You asked only about Germany, and TimWolla's answer is also correct for Austria, but not for Switzerland. (These are the three biggest countries where German is an official language.)
The reason, why this is different in different countries, is, because this is a matter of statutory provisions, which are different from nation to nation. To put »Bad« in front of the name of a town has similarities to »Dr.« as part of a persons name.
The word Bad means bath, spa.
In Germany such towns may call themselves »Bad«, which contain a medical spa, that is approved by the national authorities. It also has to have the legal state of a »Stadt« (city).
In Austria, it's not the national authorities who decide which town may carry this title, but the states authorities (Austria has 9 states, Germany has 16 states), and they do it for medical spas, thermal baths and air spas. So you can find towns in Austria, which contain the word »Bad« in their name, but which just have fresh air, but no bath (i.e. no water spa). An example for such a town is Bad Goisern, which lays close to Bad Ischl and Bad Aussee, who both have conventional spas, while there is no conventional spa (but just fresh air) in Bad Goisern.
In Austria a Bad doesn't need to have the legal state of a »Stadt«. Bad Goisern, for example, is not a Stadt (city), it's just a Marktgemeinde (market community).
Italy (»Terme«), France (»les-Bains«), Poland (»Zdrój«) and Serbia (»banja«) have similar regulations for town-titles that refer to spas (which in all four nations stand behind the town's name). But German is not an official language in any of these nations, so there in no Bad in any other nation but Germany and Austria. (One exception is Südtirol, which is a part of Italy. German is an official language in this part of Italy, but city names are created there according to Italian laws, and so there is no Bad in Südtirol.)
German also has the state of an official language in Switzerland, Liechtenstein, Luxembourg and Belgium, but non of these nations has regulations for town-titles of spas, so no town in those countries contain the word »Bad« in their name.
pronunciation: [baːd ˈfʊkɪŋ] (rhymes to "hard booking" in non-rhotic accents, i.e. when the r in hard is silent)
In Austria, there is a little village called Fucking, who's name accidentally is written identically to the progressive form of a famous English verb (but it is pronounced differently). Because of this accidentally similarity, the Austrian Author Kurt Palm wrote a novel named »Bad Fucking« in 2010, and in 2013 the Austrian movie director Harald Sicheritz made a movie (a comedy) with the same title out of this book:
But while the little village Fucking really exists, Bad Fucking is just a fictional place, and the part Bad refers to the fact, that this fictional village is an air spa (i.e. has fresh air).