Moaning Myrtle could go through anything you can name, but makes physical contact with water in her toilet, and can turn on taps. Why's that? What can ghosts touch and what can't they touch?
This is not based on any super-special canonical material other than my observations. It is correct that ghosts can move through certain objects and come into physical contact with others. As I said in my comment, it seems that what they float through and what they physically contact is based upon what they focus upon. Consider Myrtle turning on a tap, or sitting in a toilet cubicle; she would be focusing upon turning that tap. When ghosts don't particularly want to physically interact with something though, they just float past through it. Another example are all the things Peeves can pick up and manipulate, but he can still float through walls just like any other ghost.
This seems the most logical explanation to me and, according to it, the ghosts should be able to lean against a wall if they wanted (although I don't recall this actually happening). Similarly though ghosts can fly through ceilings/floors (again I don't recall any specifics, but I do recall seeing/reading it at some point), but don't go floating through them if they don't want to.
This is one of those things about Harry Potter that you just have to accept at face value because in the books themselves there is no explanation about ghosts.
It's kinda like the eternal question so many fans ask:
"Why not just shoot Voldemort?"
It's mostly situational in that she can do what the story needs her to be able to do.
I would say that they can come into contact with anything because they are like air only slightly different.
Myrtle could touch the water, because she is like air.
Because of a literary inconsistency. Unlikely though.
I would say that they are like air, because clouds can touch water and contain it.
They could also have a invisible structure made of magic or some sort of fibers that hold them together. The framework could be like spiderwebs, only more sparse.
In passing through an object, they may impart a sensation of icy coldness. However, they are apparently moved by gusts of wind, as demonstrated when a petrified Nearly Headless Nick was wafted to the Hospital Wing by a large fan, although this may have been possible due to his petrified state.
If they are just air they would be able to be to be disintegrated, thus this suggests they have a magical framework, that can be strengthened through resolve and meanness.
Also, from the Peeves the Poltergeist example although not exactly a ghost, Peeves can touch objects. This is said because he is supposedly mean and that fuels them So possibly Myrtles meanness makes her able to do such task.
"A ghost, as I trust that you are all aware by now, is the imprint of a departed soul left upon the earth... and of course, as Potter so wisely tells us, transparent."
They pass through solid objects without damaging themselves or the material, but create disturbances in water, fire and air. The temperature drops in the immediate vicinity of a ghost. Their appearance can also turn flames blue
These quotes show that ghost can have physical interactions. Another thought is that maybe she stays in the toilet because she can feel it.
Your question is related to this.
So from all of these sources.
Water affects them.
Nothing solid can be touched in most cases, and it can't hurt them. As Ginny threw a book at Myrtle and that just enraged her.
They can be blew by winds
The wikia said that they are affected by fire, but I don't see anything canon about this, but it does make sense if they are cold air.
They cannot die, a least it isn't know to my knowledge.
They can be petrified, and possibly affected by similar charms.
They can "touch" people and give them a cold sensation.
They can possibly taste and smell, as is demonstrated by the 2nd book, they molded and aged the food and "flew" through it to get the taste and/or smell.
They can provide magical interference since Sir Nicholas saved a student by being there in front of him to stop him from seeing the Basilisk directly.