For pleasure: It is forbidden to anoint for pleasure purposes. [Thus, one may not apply to one’s body oil, soap, alcohol, hair tonic/cream, perfume, and deodorant.]
For removal of sweat: It is forbidden to anoint one’s body even for the sake of removing sweat.
Medical reasons: It is permitted to anoint for medical purposes [in all cases that doing so does not involve a Shabbos prohibition].
May one spray an anti repellent, or sunscreen spray, onto his body on Yom Kippur?
Some write against spraying an anti-repellent on the body, as it is similar to the prohibition against anoininting for the sake of removing sweat. [The same to sunscreen lotion spray.] If, however, one is in great pain due to the mosquitos, then it is permitted to be done, similar to the allowance to anoint for medicinal purposes.
May one use deodorant on Yom Kippur?
 Admur 614:1
 Piskeiy Teshuvos 614:1
 The reason: Although when doing so, one is not intending for the sake of pleasure, but rather simply to remove the sweat, nevertheless, it is forbidden, as by smearing on the body there is greater pleasure involved than regular bathing, and we are hence more stringent by it. [Admur ibid]
 The reason: As its purpose does not involve any pleasure at all. [Admur ibid]
 Piskeiy Teshuvos 614 footnote 3
 Admur 614:1