When looking at newer GA aircraft, for example, Cessna 172s it is very obvious that the seat design has changed quite a lot over time. With the older ones having very short backrests and the newer ones being equipped with quite high seats including headrests the analogy to the automotive world is undeniable. Do the same reasons like impact safety apply to this development? Would it make sense to retrofit headrests for safety reasons?
You aren't going to get rear ended in an airplane, which is the primary safety benefit of headrests. On the other hand, there is still some benefit to having them because in a hard forward crash, if you have shoulder harnesses on, you will probably get rebounded back into the seat to some degree or another, and the headrest will keep your head from snapping back too far during the rebound. So better one there than not.
I've been following GA since the late 60s (I still have a FLYING magazine issue I bought at a corner store in 1969) and would say that they were mostly adopted in the 70s for "styling" purposes (keeping up with car interiors; there was a big effort to make GA airplanes as car-like as possible back then), but they aren't totally useless for protecting your neck in the right kind of crash scenario.
The really big sea-change in crash safety for GA aircraft was the adoption of shoulder harnesses, also in the 70s. They made many crashes walk-away events that previously left you with fatal head injuries, or if you were lucky, you survived with a hamburger face.