Legendary is a catchphrase commonly used by Barney Stinson to describe the enormity and awesome-ness of a situation or event. However, other members of the gang have used the "Legendary" phrase before, so it is not exclusive to Barney.
Barney often uses this catchphrase together with the line "Wait for it", see that article for more information and quotes.
It's going to be legen-- wait for it-- and I hope you're not lactose intolerant, because the second half of the word is-- dary! Legendary!
We're building an igloo in Central Park. It's going to be legendary! Snow suit up!
Tonight is going to be legendary-- wait for it... dary!
It's going to be legen- wait for it- (end of Season 2)