Lucky's tail is cleaner towards the bottom because he cleans that part himself pretty well. He doesn't like me trying to clean his tail so as long as he does a decent job, I only use a damp cloth.
Marbles in the back let me clean his tail so it's pretty clean. Bandit, towards the front would let me use the damp cloth but he didn't care for me to mess with his tail too often. His tail wasn't too dirty though.
A dirty tail on the other hand may be a darker color, look like it has darker scales on it or brown spots.
To clean a rat tail, use a damp cloth, soft toothbrush and warm water. I usually use a damp cloth and start at the base of the tail closest to the body and in one smooth gentle movement, move the cloth down the tail. My rats will usually let me do this a few times before they get annoyed with me. I just come back the next day and do it again. If your rat is letting you, you can use the soft toothbrush to gently clean the tail with a little warm water. Mine don't really like that though.
The brown crust and spots seen on most dirty rat tails is caused by shedding skin, feces, urine, dirt and food particles. Dead skin, urine and other particulates can build up quickly on your rat's tail so wiping it down every day is a good idea.