My company is talking of making my department wear uniforms but not applying that rule to the rest of the company. Everyone in the company has contact with the public so that is not the reason. When I asked why we were the only ones getting uniforms, I was told because our department was the only one with the funds. Can they do this?
Almost certainly yes they can. If making you wear these uniforms isn't somehow tantamount to discrimination against a protected class in your country (e.g. you're all female and they're making you all wear absurdly short miniskirts) then why wouldn't they be allowed to make some particular teams wear uniforms?
If it's only your team wearing them now due to funding concerns then it may be that other teams will see them introduced over time. Someone has to be first.
My employer expects canteen/kitchen staff to wear appropriate uniform for serving and preparing food, for example. Nothing unusual about that.