Drywall joint compound is a messy product at any time. When you sand it, the dust can be not only a health hazard, but it gets into everything because it's so fine. It is so invasive that using a vacuum to suck it up can void the warranties on some vacuum cleaners.
Wet sponging instead of sanding is a better alternative. It is slower and more difficult, but lessens the problems associated with dry sanding.
Pros and Cons of Sanding
Wet sponge sanding significantly reduces the dust in the air. It also softens the compound as you dampen it, so you can paint right over it when it dries. Wet sanding can also be used as an easy way to smooth an unpainted drywall.
One advantage to wet sanding is that you can match a textured surface with a sponge by rolling the sponge over the damp compound while lifting it up. If you're trying to match a textured surface, practice on a bit of cardboard first. It is quite easy, but you must get the smoothing and feathering of the edges done well.
Sponging is more difficult and takes a lot longer than dry sanding, however, and requires more patience.
How to Sponge
You will need a large, thick sponge, a large bucket, and clean water.
Mud your drywall joints and fill the bucket ¾ of the way with lukewarm water. When your joint compound is nearly, but not completely dry, soak your sponge in the water and squeeze it out. The compound is dry enough to start sponging when it will not smear when you touch it.
With light, circular strokes, rub very lightly over the compound. Using the moisture to do the work, not your hand pressure, work on any ridges and spikes. Be careful not to rub too hard on the paper tape or you can wear through it. After a time, the smears will get thick and the sponge hard to work. Rinse and squeeze out the sponge, allowing it to be a little wetter than the first time. If you are using a drywall sponge, use the rough side for the first pass and the smooth side for the second pass. Rinse out the sponge often, as it clogs up and starts to be difficult to work with.
This second pass should concentrate on smoothing out the joint compound. Don't make any more passes as you will get the drywall paper too wet. If the compound is not smooth enough after these two passes, you will need to allow the compound to dry and then sand it.
Make sure you do not overwork the area and remove too much compound. If you use too much pressure while you are wet sanding you will cause craters which you will need to refill and finish.
If your sponge is too wet, water will drip down the seams, dissolving the compound and causing craters that you will have to refill.