Why do we need to pee if we hear, see or touch a flow of water? There is no definite answer, but scientists suggest that feeling the stimulus to pee at the sound of running water is indeed a conditioned, reflexive response: such a sound resembles the noise one produces when urinating and therefore produces a psychological association with the action. The body begins experiencing the sensation of relief one has when finally micturating and one happens to desire to actually go to the toilet and live the gratifying sensation that results from emptying the bladder.
Another explanation to this common phenomenon combines psychological factors with the physiological structure of our body. In particular, urine's stream through the narrow tube called urethra is controlled by two muscle rings called sphincters. The first one is at the top of the urethra and works automatically, following the input of the parasympathetic nervous system (PNS). When the bladder is full, the brain signals the internal sphincter to relax and open. On the contrary, we consciously command the second, external one, so that we can hold in pee if we have no possibility to go at the moment.
Since the PNS tends to be more active during rest and quiet, it is likely that the relaxing effect provoked by the sound of water causes our brain to communicate with the internal sphincter and make it go open.
Finally, a Darwinian argument exists. In order to survive, our ancestors had to hide from predators. Hence, they also had to mask the smell of their pee, which would have otherwise been a clear sign of their presence, putting them at risk of being killed. One of the easiest and most effective ways to do that was to micturate in rivers, streams or under pouring rain, so that urine was diluted and its smell was reduced. Over time, the danger of peeing has been overcome, yet the unconscious association between the action and running water might have remained as a consequence of evolutionary advantage.
Even if the ultimate reason of it is not known, nursing and psychology texts advise running water in the sink in order to train toddlers to use the pot, or to help people with paruresis. All in all, listening to records of water sounds can be a good technique not only to relax, but also to ease one's bathroom experience, if needed. But if you do it, do it when you know there is a toilet close by!