Perhaps the sister is a witch (in a fantasy story). She might be trying to protect her brother from some danger. She believes that by turning him into a girl, he will be safer. Maybe there is a war or a hunt for boys in their land, and she uses her magic to change his gender.
One reason could be that the sister has some sort of enchanted object. For instance, a mirror that has the power to change one's appearance and gender when looked into. So, when the boy looks into it by accident or at his sister's urging, he becomes a girl.