WD-40 is OK for cleaning your chain, especially if it hasn't been cleaned in a long while and there's a lot of built up greasy crap on there. You just have to remember that it doesn't contain enough lube to be useful . . . so after wiping the chain dry from the WD-40 re-lube with a proper bike lubricant. If you don't do this, your chain will rust very quickly after applying WD-40.
As far as cleaning goes, I'm a fan of a big bucket of soapy water (a few drops of dish soap is great) and a large sponge that you don't mind turning black. Takes about 5 minutes:
- Quickly go top to bottom with the sponge, wiping everything clean. (If you have coloured bar tape, use a separate rag/sponge for this, or grease from previous washes will make your bar tape kinda blackish.)
- Put the sponge against both of your jockey wheels on the rear derailleur and backpedal to wipe them clean.
- Wrap the sponge around the chain and backpedal a bit to clean off most of the grime there.
- Take the rear wheel off, and wash down the cassette and braking surface on both sides of the rear wheel.
- Spin the front wheel and wash off the braking surface on both sides
- Put the rear wheel back on, and hose everything clean with some water
- Bounce the bike a couple times to knock most of the water off
- Finally, re-lube brake pivots, pivots on your derailleurs, and chain
In the winter I do the above after every ride, but first spray WD-40 on the chain as a degreaser/to get slushy salty crap out of it. If you use boiling water it melts the snow and ice, and if you work fast it will not re-freeze before you're done.