Clams can harbor grit that makes eating unpleasant, so it's worth the extra step to soak before cooking in order to purge them.
Many sources recommend adding cornmeal to the soaking water to help the process along. "I used to use cornmeal to purge clams," says JoanN, "until I read Rick Moonen on the subject. He says that cornmeal works just fine; the clams exchange whatever impurities they may have inside for the cornmeal. But then, when you go to cook the clams, you've got polenta." Now JoanN uses about 1/4 cup of coarse salt per quart of soaking water, for about half an hour. "Works fine," she says. "No polenta."
"Some bivalves are dirtier them others," notes MGZ. "Therefore, how long they must sit in the water will vary. Typically, I change the water now and again and look to see if there's sand in the bottom of the tub. If not, it's time to eat."
You can soak wild mussels the same way, but cultivated mussels are usually grit-free and don't need soaking.