From the British Aikido website:
The most popular theory of the origins of the coloured belt system is that it was originated by the father of Judo himself, Jigoro Kano. Of all the various theories I have read, I believe that this is probably the the nearer to the true origin that we will ever get.