Snakes yawn as a way to realign the jaw after a large meal. Yawning helps the snake breathe more easily, especially if the snake has a respiratory problem.
Snakes frequently eat prey that is larger than their heads. They temporarily dislocate their jaws to allow the food item to pass into the throat. After the snake is done swallowing, it yawns to force its jaw back into normal position.
When a snake yawns, it exposes its windpipe allowing better airflow. Frequent yawning is a sign of pneumonia or another respiratory disease. Snakes are subject to bacterial and fungal infections from the prey they eat.