The full text of the related passage is this, with Duke Theseus speaking:
Either to die the death, or to abjure
Forever the society of men.
Therefore, fair Hermia, question your desires,
Know of your youth, examine well your blood,
Whether (if you yield not to your father’s choice)
You can endure the livery of a nun,
For aye to be in shady cloister mew’d,
To live a barren sister all your life,
Chaunting faint hymns to the cold fruitless moon.
Thrice blessed they that master so their blood
To undergo such maiden pilgrimage;
But earthlier happy is the rose distill’d,
Than that which withering on the virgin thorn
Grows, lives, and dies in single blessedness.
The part of the passage not quoted in the question adds context here. Theseus is talking to Hermia about remaining a virgin. He's encouraging her to consider for herself whether it is right to do so. Hermia's father wants her to marry Demetrius, but Hermia wants to marry Lysander. The Duke is telling Hermia that she may choose death, abjuration of the society of men (become a nun), or marry Demetrius, as it is the father's right and entitlement to decide who Hermia shall marry.
Here the use of "thrice blessed" is basically explaining that the path of a nun is hard and full of self sacrifice; that God finds extreme favor with them and that they are guaranteed a place in Heaven by their virtues, but also that they strive to attain or maintain those virtues all throughout life ("[...] to master so their blood / To undergo such maiden pilgrimage"). He then explains that the alternative, to marry Demetrius, would bring Hermia a happier and easier life (time on Earth).