There is sometimes confusion about when to use a comma with the conjunction and.
Here is a simple rule: use ,and whenever you could have used a period. Let me show you what I mean.
John plays baseball, and his brother plays soccer.
This compound sentence is actually two complete thoughts. We could put a period at the end of the first complete thought, like this: John plays baseball. The period shows that we have finished a complete thought.
Our second sentence would look like this: His brother plays soccer.
John plays baseball. His brother plays soccer.
We’ve used a period instead of ,and to show that we ended the first complete thought.
In the same way, you can use ,and instead of the period: John plays baseball, and his brother plays soccer.
If you use and to join two simple sentences, you must use a comma in front of and.
When the and is not joining two complete thoughts, you do not use a comma.
Look at this sentence. This sentence does not need a comma before and because it is not two complete thoughts:
I ate pancakes and sausage for breakfast.
If we separate this sentence into the words before and and the words after and, it looks like this:
I ate pancakes. Sausage for breakfast.
Do you see the problem? We can’t make this sentence into two complete thoughts.
I ate pancakes is a complete thought, but the words after and – sausage for breakfast – are not a complete thought.
In this sentence, we don’t use a comma with and. I ate pancakes and sausage for breakfast.
Only use a comma with and when and is joining two complete thoughts.