How do you know if you have been killed by a headshot?
If you are killed via a headshot, or you kill someone via a headshot, a little green target will appear next to the name of the person who was killed (your enemy if you killed someone, or you if you were killed).
Keep in mind this only shows up upon someone's death, if you headshot someone, or are headshot, and no-one dies, you won't know for sure if it was a headshot or not.