Commas also separate or enclose what is considered nonessential information.
My co-worker, Mary, has just arrived to work.
John, believing his fiancée was unfaithful, broke off the engagement.
However, take a look at the following example:
My sister, Nancy, is a waitress.
The use of the commas implies that the author of the sentence has only one sister – she is sufficiently identified and her name is considered additional information.
My sister Nancy is a waitress. – Leaving out the commas, on the other hand, suggests that the author has more than one sister. Her name is essential information since it identifies which of the sisters is a waitress.
NOTE: Use commas only when an object or a person is adequately identified and you are providing additional information about it.