I was always told this as a kid, and have been told it again recently. I'm skeptical, do they actually have any medicinal properties?
This is from a forum post so it could use a bit more of a hard reference, but it contains some useful and verifiable info:
It is said that nettle stings are caused by the formic acid in the sting solution. If it were true, then Dock leaves, which contain Oxalic acid, would not be a remedy. The extremely fine syringe type hair of the Nettle breaks off easily and penetrates the skin. Within this hair is a stinging solution which is only 1% Formic acid. A 2% - 10% concentration is required for the acid to be an irritant. It is histamine and serotonin in the sting which cause the irritation.
Dock leaf sap contains a natural antihistamine. If you rub too hard with the dock leaf, you will merely disturb the nettle sting in your skin and make it worse. The best way to deal with the problem is to break off some dock leaf and chew it for a few seconds, then gently rub the saliva/dock sap mixture around the sting. The antihistamine from the dock leaf together with the natural healing properties of saliva will ease the stinging sensation.
According to the Natural History Museum "the dock leaf contains chemicals that when rubbed over the sting neutralise it and also cool the skin down."
On the other hand a doctor writing in The Times said this theory "has never been proved scientifically" and that there are three possible reasons why it seems to work: soothing agents (though this has been challenged on with the suggestion that dock leaves have "no pharmacologically relevant properties"); the physical act of rubbing as a counter-stimulation; or a placebo effect.