The untested premise here is that males receive harsher sentences for these kinds of crimes than females.
To address your question and provide you with references you can read, I won't cite anything behind a paywall, which is tough. Luckily, someone posted their M.A. thesis on exactly this subject online for free. It was completed in 2012 under the faculty at Arizona State University.
I'll summarize some key points below. You can refer to the original document for their references. If you have access to an academic database, you can read the referenced articles there.
In General, Females Receive More Lenient Sentences than Males
The literature review discusses gender differences in sentencing, and concludes that males receive harsher sentences than females. It also states that this tends to happen because judges deviate from sentencing guidelines more often when sentencing females.
Sentencing Regarding Improper Relationships with Students
This research examined sentencing for cases within a single area in Arizona over a 10 year period. They note that 1 case was rejected because they could not procure records, leaving them with 13 cases of teachers having inappropriate relationships with students.
These 13 cases involved 16 teachers - 11 male and 5 female. Two of the victims were male, the remaining victims were all female. The methods section describes more about the cases and their similarities/differences.
The project finds that the female teachers were generally given the minimum sentence, while male teachers were generally given something closer to the presumptive sentence (which is what you get unless some other factor increases/decreases it). Since the presumptive sentence is the default, it seems that judges deviated from the presumptive sentence for female perpetrators.
Explanations
Their research does not attempt to identify a singular reason for this, but identifies three possibilities for a gender gap in sentencing in the literature review section. These are theoretical grounds for any gender gap in sentencing, not just this type of crime:
- Judicial paternalism - Judges are usually male, and may treat sentencing perpetrators like disciplining children. Therefore, they may give females lighter sentences than males.
- Chivalry - Judges feel they are protecting females from punishment which is too intense to be suitable for them. One spin on this is that females may more often be seen as responsible for childcare, and so the family is being protected when the woman is protected.
- Focal theory - Females are seen as less blameworthy than males, females are viewed as being intrinsically less of a risk to society than males, and it may be perceived that females need to be shielded from harsh punishments.
Caveats
This research shows that in a limited area, females do receive harsher punishments than males for having improper relationships with students. It outlines some theoretical reasons why. It was conducted under the guidance of experienced faculty who know how to do good research.
However - it can not be generalized to other areas and it doesn't fully explore why this happens. Despite these limitations, it decently answers part of your question and hopefully guides you to a better explanation.