Not for the same reasons we do! Humans yawn to get a sudden intake of fresh air, but horses do not breathe through their mouths.
So, why do they do it? There are several reasons.
One is just to stretch their jaw muscles, which is why some horses yawn when unbridled. Horses may also yawn when their "arousal state changes" - which is a fancy way of saying when they first wake up. This might also be more a stretch than anything else.
Yawning can also be a sign of abdominal pain, and a horse that suddenly starts yawning a lot should be checked for colic.