The dative pronoun here means something like "for me". Many German verbs have this sort of construction, more than in English. But English has it too:
He made me some soup
She bought me a loaf of bread
"Waschen" is one example of a German verb that has this construction where the English equivalent doesn't. It doesn't just work with a reflexive construction, but can also be plain old transitive:
Der Papst wäscht ihnen die Füße (The pope washes their feet)
Die Mutter wäscht ihm das Gesicht (The mother washes his face)
Das Kind wäscht sich die Hände (The child washes its hands)
Some other examples of German verbs that have this construction where English doesn't include:
Ich putze mir die Zähne (I brush my teeth)
Ich reibe mir die Hände (I rub my hands)
Ich lackiere mir die Fingernägel (I paint my fingernails)
Generally this seems to be common with verbs that involve doing something to your own body. But there are also other examples:
Ich hole mir ein Brot (I get some bread for myself)
Ich kaufe mir ein Kleid (I buy a dress for myself)
Ich suche mir einen Sitzplatz (I look for a seat for myself)
"Ich wasche die Hände" is not wrong, but it's somewhat ambiguous whose hands it is you're washing. Just like "I wash the hands" in English.
"Ich wasche meine Hände" is correct and means the same thing as "Ich wasche mir die Hände", but it seems more formal and more like written language. Unlike "ich wasche mir die Hände", "ich wasche meine Hände" could also mean that you own some hands that are not actually attached to your body (for example, doll hands) and are washing those.