Its tradition.. everybody wears them. The cap have different colours depending on your school/major.
When your graduation is over all your friends sign the hat and you keep it as a memory...
and I think the reason why your dress is white is that you should look innocent and sweet
I´m still a little "graduation high" so sorry if this sounds a little confusing =)