In the IDW comics canon (not sure it applies in the show proper though), it's implied the Nightmare entity took over control of Luna's body after merging with her to form "Nightmare Moon". The "real" Luna was trapped in a body she didn't really control and could only fight back in subtle ways (e.g. the "tests" seen when the soon-to-be Mane Six were searching for the Elements of Harmony in the series premiere).