I really would like, for the sake of the narrative and nature of MLP, to say: "Yes! She was! It was a reasonable consequence of her actions! *vomits tough love*" but in my heart, I just can't. What Luna, or Nightmare, did was absolutely awful. Not an argument. But in my opinion, it was still a drastic measure to do against your own sister. Not to mention the general effects of being trapped to the moon. But also, I think Celestia herself knew that it was wrong- and was a last resort for her too. I imagine it to be in someway similar to the actions and thinking that any gaurdian/patent et cetera would have with an unruly or downright malicious kid (can't image what it would be like if your kid (or in context, just generally your responsibility) staged a coup for attention). Her actions were pure desperation.