Yes, select an object of a certain color and choose "Select>Same>Fill Color" (or other shared attribute). Then move the selection to a new layer. Do this for each color in the file.
I have heard questions like this before.
Some people seem to think that each colour should be on a separate layer.
I hope you are not one of them, because it is a complete misconception and defeats the object of Illustrator’s object stacking system.
Why do you think you need to collect objects of the same colour onto separate layers?
Steve, why use layers at all then? Groups and Layers are helpful options for organizing a file. To each his/her own.
Groups and Layers are helpful options for organizing a file.
You know that. I know that.
But some people appear to think that layers have something to do with colour separations or plates, which of course they don’t.
A question similar to slangenm’s came in some moons ago and a misconception was promptly corrected.