Usually it shows admiration from the person who say it towards the person to whom the sentence is intended.
(person 1): I got that girl's phone number.
(person 2): You da man!
(person 1): Hey, can you lend me 10 bucks?
(person 2): Yes, here they are.
(parson 1): Oh man, thank you, you da man!