It is correct to put a comma before a coordinating conjunction when the second clause is independent of the first, e.g.,
Sally picked apples, and she placed them in her basket.
but not if you remove the second "she", e.g.,
Sally picked apples and placed them in her basket.
(Here the second clause, "placed them in her basket" is dependent as it can't be a standalone sentence.)*
What if the first clause is lengthy? E.g.,
Sally picked apples to sell at the farmers' market, and placed them in her basket.
Here, I feel that avoiding the comma makes the sentence sound wrong, although I can't put my finger on why.
Also, if a comma is warranted in such a situation, how long is long enough?
Sally picked apples to sell and placed them in her basket.
Sally picked apples to sell at the world-renowned Nettleton Farmers' Market on Tuesday, and placed them in her basket.
*See my answer regarding this error