This is because "yes" is an interjection in this case, and interjections usually require a comma after them.
Here are some examples:
* Yes, I would love to go to the movies with you.
* Yes, please, I'll have the soup and salad.
* Yes, but I have a meeting later this afternoon.