What is causing a whistling sound coming from my upstairs bathroom?
Water pressure:
This could be caused by higher than normal water pressure, that's why the noise changes when you turn on the sink (you reduce the flow to the shower).
Solution:
You could adjust the Pressure Reducing Valve   for the whole house (if you have one), or install one on the line to the shower.

Reducing Washer:
In most newer shower heads, there is a washer that reduces the water flow to save water.
Solution:
Removing this washer and replacing it with a normal one should fix the problem (but then you'll be &quot;wasting&quot; water).

Diverter:
This might also be caused by the diverter (the mechanism that diverts the water to the shower head, rather than the tub spout), if the valve is not functioning properly it could cause noise as the water passes through it. This may be accompanied by a small amount of water still flowing from the tub spout when the shower is on (basically it could be creating a &quot;water whistle&quot;, similar to how a flute works but with water instead of air).
Solution:
Replace the diverter.

Loose Pipes:
The noise could be increased by improperly secured plumbing, as the pipes are allowed to resonate freely.
Solution:
Properly fastening the pipes using clamps, may reduce the sound.