This form of a Dativ is called a "Pertinenz-Dativ". It is used if the objet of the sentence is belonging to someone or something. Generally there exists an (almost) equivelent Genitiv construction.

"Pertinenz-Dativ" referring to the object being a body part of a person:
Sie sieht ihm in die Augen. = Sie sieht in seine Augen.
= She looks into his eyes.

"Pertinenz-Dativ" referring to the subject being a body part of a person:
Mir tut der Kopf weh. = Mein Kopf tut weh.
= My head aches.

"Pertinenz-Dativ" referring to the subject being a thing belonging to a person:
Da geht euch der Hut hoch.
(Song text using a fixed expression, no equivalent Genitiv construction.)
= That will turn you on.