The shouts the students do while punching and kicking is called a Kiai (気合) which is pronounced "Kee eye." The Kiai is for many reasons. It forces the student to exhale at the proper time, helping them to learn breath control. It helps the student to learn when to focus all the muscles of the body, important in developing power and body strength. And it can serve to focus mind and body on the complete intent of the technique, overwhelming the opponent with strength of spirit.
A loud Kiai should coincide with the strike or technique being delivered, with the result that all the power of the body is concentrated at the exact instant and focus of impact.
The process of perfecting the Kiai requires mastering certain appropriate breathing
exercises and techniques which can be traced back to the Pranayama of the Hindus.
Pranayama is the formal practice of controlling the breath, which is the source of our prana, or vital life force. (This would seem to be a point of evidence supporting the introduction of kung-fu to China from India many centuries ago.) The breathing technique, called "kokyu" or "fukushiki kokyu" in Japanese, involves breathing from the lower stomach area with deep abdominal breathing, which sets the "ki" in motion. This practice requires perfect synchronisation of breathing with body movement and can only be achieved through constant practice.
Kiai is not yelling but a method of breathing!