A dirty chain can cause accelerated wear of drivechain components, poor shifting and sometimes excess drivechain noise.
The best way to clean a chain on a bike is just to get a lot of rags, and wipe it till clean. Covering the rags in something like GT85 helps in serious cases. After you have cleaned the chain, apply lubricant.
The alternative is to buy a specific chain cleaning tool, however these use horrible solvents and wash the lubricant out of the inside of your chain - so not ideal.
Having a clean outside to the chain really doesn't matter - chain wear occurs inside where you cannot see. The only reason for having a chain that is clean on the outside is so that when you lubricate it it doesn't wash the dirt on the outside where it is harmless into the inside where it will grind the chain pins and bushes away.
I would recommend getting a quick link then take the chain off, give it the Sheldon Shake treatment and then lubricate it and put it back. Or if you are really anal about cleanliness Sheldon has another solution.