It means expressing something accurately or doing something exactly right.
“When you said I should focus on my strengths for the presentation, you hit the nail on the head – I received positive feedback from the audience!”