From what we know of her history (mostly from "A Good Man Goes to War"), it wasn't a question of her "turning good". She was woken from long-term hibernation by workers building the London Underground during the 19th century. Those workers killed several of Vastra's people. She saw the workers as attackers -- indeed, as murderers -- & took revenge on them. The Doctor persuaded her to desist from this. That shows she was already good enough to be open to persuasion. (Humans have rather often behaved in similar ways -- still do -- & they're not always willing to listen to those trying to get them to stop.)
All of this took place off screen before we ever met Vastra, so we don't know just when it happened.