In my country (Indonesia), our school uniform has a badge that indicates what grade we are. It was not just my school, other schools here also have it like this. Thus, this is not/no longer (since Indonesia used to be under the occupation of the Japanese forces) a Japanese specific culture.
As to why we have it that way, a page in Wikipedia explained it well. Basically, the uniform was modeled after the sailor uniform. The difference between Freshman, Junior, and Senior uniform rooted back from the rank hierarchy in the army. Think of advancing class as advancing in rank, like from a Sergeant into a Major, and then General.
Edit: Added from the Tomato Cabal Line group discussion (credit to Krazer), the color on the uniforms and shoes denote the year the students belong in. The color is rotated each year. E.g. the color of the graduated senior becomes the color of the new incoming freshman. This is so that you can tell who is your senior and who is your junior. The color is rotated so that you don't have to change color every year.