Many of the schools around here have a uniform policy but they aren't overly strict. We have navy or khaki bottoms with red, white, or blue shirts. There is no specification on types of pants or shirts, just the colors. Even with that laxness, a ton of kids do not come in uniform. It is hard to keep track of also because some kids have a uniform waiver due to "freedom of expression" reasons.
We have a uniform store where you can get the clothing with the school logo embroidered on, or you can just get the stuff at Target or wherever. I think it makes a subtle difference in discipline, but that's about it.
On the other hand, I went to Catholic school and the uniform policy was VERY strict. If you have the wrong kind of socks (short/ankle sock were not allowed) they had no problem sending you home for the day, or waiting in the office for your parents to bring you the right item. Hair accessories other than elastic bands for ponytails were not allowed. No sneakers, dress shoes only. Shirts had to be tucked in and a belt worn at all times. Once in high school I wore a black bra under my white shirt and got sent home.

Another time it was cold and I got demerits for wearing sweatpants under my uniform skirt. It was cold - definitely not a fashion statement.
In that environment, I think it carried over/enhanced discipline. There were high expectations of students and if we didn't come to school properly dressed and ready to learn, then we were going home. Let our parents deal with us. And if our parents didn't like it, then they could leave. There was always a waiting list, so people didn't play around.
Long story short - a uniform policy is only as effective as how strongly it is enforced.