<p>I don’t see wearing normal everyday hats as being particularly rude, unless you do stupid crap with them, like pull baseball caps over your face and feign (or actually) sleep. </p>
<p>Now, on the other hand, wearing a large flamboyant multicolored hat with rainbow feathers protruding from it is enough in itself to be distracting and is, most definitely, rude to the teacher.</p>
<p>Then again, it really depends on the teacher. Some don’t care what you wear, some do.</p>