Grammatically, “We have to wear school uniforms” is the answer because “we” is plural and therefore you need multiple “uniforms”. However, in common spoken English you will hear “We have to wear a uniform” which is technically incorrect but is really a short way of saying “We each have to wear a uniform”. Either way it will be well understood. Another clearer example is “We have to buy a car” vs. “We each have to buy a car”. The first means only one car is bought collectively whereas the second means each person will buy a car.