It's been my general understanding that snakes yawn to realign and stretch their jaws, or if they yawn a lot it can be a sign of respiratory infection.
I recently got the following comment on a video of one of my corns yawning:
"It's called "venting". Usually they do it after a meal to release gases built up. Snakes don't fart."
Searching gets me no relevant results to verify this little tidbit, so I leave it to the experts to confirm this one for me. 



