Here's the rule:
Independent Clause, conjunction Independent Clause
Example:
* I went to the store, and I bought some milk.
Here's why:
The comma acts as a signal that two separate thoughts are being combined. It helps the reader understand that the first sentence is complete before the second sentence begins.
Important Note:
* This rule only applies when you're joining two complete sentences. If you're joining a dependent clause to an independent clause, the comma generally goes *after* the dependent clause.
* If you are using a conjunction like "for" or "so" or "yet," the comma should go before the conjunction.