It's always correct to put a comma before "and" where ambiguity would otherwise ensue:
1. I want to thank my parents, Sam and Dave.
Unless you are indeed the result of some curious monosexual coupling, change to:
1a. I want to thank my parents, Sam, and Dave.
Elsewhere, there are two schools of thought. School A says that where the last term of a list is introduced by "and", it is redundant to put a comma before that "and". Thus School A prefers:
2. I bought some apples, pears and oranges.
School B on the other hand thinks that the comma before "and" denotes a pause, and is therefore not redundant. Thus School B prefers:
2a. I bought some apples, pears, and oranges.
(For some reason, lists of fruits are obligatory in this particular debate.)
In British English, School A is predominant, especially in newspapers and magazines. However, some academic publishers (notably Oxford University Press; whence this comma's name, the "Oxford comma") belong to School B.