Is a woman allowed to speak while using the bathroom?
There are two reason why the Shulchan Aruch says that we should not talk in the bathroom. One is because of overall tznius, and secondly for a kabalah reason regarding bad spirits in the bathroom. The Gemora says that when a bathroom is in a field, and there can be a serious yichud issue if a woman is n the bathroom and a man mistakenly comes in, therefore it is permitted for women to specifically talk in the bathroom, so that others will here them and not enter. According to a number of poskim, when the bathroom is not in a field, such as our bathrooms nowadays, especially when they are at home, and lock from the inside, since there is no yichud issue, therefore men and women are equal regarding this halacha.
There are a few points general points regarding this halacha that are noteworthy.
It is permitted to talk about things related to the bathroom. (Salmas Chaim 10)
If there is a big need to talk it is permitted, if the person has not yet relieved himself.
According to some opinions, if one entered the bathroom for a different reason, (i.e. to get something ) that it is permitted to talk, especially if the bathroom is designated for other uses besides as a bathroom.
Rambam Hilchos Daos 5, Even Haezer 22-13, M:B 3-4, Daas Noteh 1-208, Aruch Hashulchan O:CH 3-4, Piskei Teshuvos 3-3.