It's called the vocative comma. When you address your listener or reader by name or by a description, written English grammar requires that you set off the noun or noun phrase by which you name your audience with commas. It appears in your example sentence because the speaker is directly addressing his friends.
For example, this sentence does not directly address Fred:
I saw Fred steal my roses.
The next sentence addresses Fred. It's how you'd say the same thing if you were talking to Fred:
Fred, I saw you steal my roses.
Here are some common sentences that require the vocative comma when written:
Nice job, Fred!
Ladies and gentlemen, … (at the beginning of a speech)
Dear Fred, … (at the beginning of a letter)
Gentlemen, start your engines. (Just before the beginning of an auto race.)
I can only say in my defense, your honor, that the roses were grown from seeds that the plaintiff had stolen from me. (Addressing the judge during a trial.)
It's called "vocative" by analogy with the "vocative case". In some languages, you use an altered form of a person's name when addressing them directly. For example, in Latin, when you address Quintus directly, you call him Quinte; when you address Julius, you call him Julī; and in Catholicism, when you address Dominus ("the lord") in prayers and hymns, you call him Domine.
English doesn't have a vocative case, but it does use special intonation for direct address, which almost amounts to the same thing. At the start of a sentence, you normally say a vocative phrase in a higher pitch than what follows; in the middle or at the end of a sentence, you normally say a vocative phrase in a lower pitch than the surrounding or preceding words. The comma in writing suggests this change of intonation as well as the slight pause or extended final syllable that also usually occurs in a vocative phrase.
The word "vocative" itself comes from the Latin word for "call", because it's how you call to someone. The same root appears in "vocation" (a calling), "vocabulary" (what you call stuff), and "convocation" (a meeting where many people are called together).