The practice for women to immerse in a mikveh as a sign of teshuvah (repentence) is cited in gloss 8 of the Magen Avraham on the Shulchan Aruch Orach Chaim 606. He explains that there are those who say that the immersion prior to Yom Kippur mentioned in the Shulchan Aruch is referring to an immersion for teshuvah that was customary even for boys and girls over the age of 13 or 12. As it is not an immersion to become ritually pure, even if the girl was a niddah she could immerse.
While this is permissible, some later authorities banned the practice for fear that women may be confused by the immersion and think they are no longer in niddah and transgress the prohibition against relations during niddah.
For a comprehensive review of the topic, you can also see Responsa on Contemporary Jewish Women's Issues (KTAV) chapter 10, written by Rabbi Yehuda Henkin, the Rabbinic supervisor for this site.