A Ghost can create dirty water in one of two ways: interacting with a sink already filled with water, or by activating an empty sink. This can be useful for tracking the Ghost's general location.
Players may use the Photo Camera to take a photo of dirty water to obtain a small bonus at the end of the round, even if it is not an Objective. More money will be awarded if the Dirty Water optional objective is also completed.
Dirty water is notoriously unreliable; you should not risk jeopardizing the entire contract in order to have the ghost create it, even if it is one of the main objectives. If the Ghost Room is a bathroom or kitchen with a sink in it then Dirty Water is likely to appear (eventually). If there is no sink near the Ghost room (e.g. if the room is the basement, attic, a wing of Prison, etc.) then Dirty Water is highly unlikely to occur.
Interacting with the Faucet
Contrary to popular belief, a ghost CAN still interact with a sink the player has interacted with first. It is highly advised to turn OFF the sink after you are done filling it, in order to hear it turn on again should the ghost interact with it. As far as it's known, there does not seem to be any difference in the chances to get Dirty Water if the player has pre-filled a sink or if it has been left alone.
The primary reason to fill a sink yourself instead of waiting for the ghost to do so is when the Ghost Room itself has a sink in it, and you are trying to goad it into creating Dirty Water. Being in the ghost room and turning on the water yourself can sometimes cause the ghost to immediately cause Dirty Water if the ghost is also in the room at the time, although this is a subjective strategy and does not always work.
It is thought/rumored that interacting with a certain object makes it more likely for the Ghost to interact with that same object, which is why some player may repeatedly turn the faucet on and off in an effort to get Dirty water.
Often a better strategy, should there be a sink in the ghost room, is to place a Video camera looking at the sink (without interacting with it, as night vision does not clearly contrast regular water with dirty water), so that you can watch for the ghost to fill the sink from the safety of the Van.