A uniform is clothing. Such clothing should always look the same on different people. In this way, you show that these people belong together.
Uniforms are worn in the army, for example. In this way, you can immediately recognize that a soldier belongs to a certain army. If you want to be a real soldier, you even have to wear a uniform. If you fight in a war without a uniform, you are considered a mere criminal.
Even civil servants or employees of a company sometimes wear uniforms. Examples are bus drivers and conductors. In the past, people were even more likely to wear uniforms than they are today. Also, uniforms used to look a lot like soldiers' uniforms. Today, there are more differences. A uniform on letter carriers is more of a practical clothing at work.
But uniforms are not just about everyone looking the same. Especially with soldiers, you can also see differences. The important soldiers, the officers, often have different uniforms than the ordinary soldiers. By badges and other signs you can see exactly how significant a soldier is and what he is allowed to determine.