The water spray creates a wind, blowing inside the shower stall, and causes the air pressure to fall and this pulls the curtain inwards.
David Schmidt of the University of Massachusetts. Using a home computer and modeling software he built a model of the shower stall in the computer’s memory, the space divided into 50,000 sections. Then using formulas of Computational Fluid Dynamics, he could simulate the effect of water spraying though these sections. His software showed the existence of air vortices that spin like hurricanes and cause a low-pressure area that sucks the curtain in. For this pioneering work, which some might say is a complete waste of time; Dr. Schmidt was awarded the 2002 Ig Noble award in Physics.
See http://tinyurl.com/2ogjrz for an explanation with an illustration which makes this clear.