Q wears two distinct types of uniform;
Uniforms that he wears to mock humanity (typically Picard) as being an aggressive, violent child-like race
... the same humanoid face and figure as with the Elizabethan dress, but now the green officer's uniform of the U.S. Marine Corps. Over his jacket pocket three rows of medals and his narrow garrison cap shows the bars of a Captain.
"Q" (MARINE CAPTAIN): Actually, the issue at stake is patriotism. You must return to your world and put an end to the communists. All it takes is a few good men.
PICARD: What? That nonsense is centuries behind us!
"Q" (MARINE CAPTAIN): But you can't deny Captain, that you're still a dangerous, savage child-race.
PICARD: Most certainly I deny it. I agree that we still were when ... humans wore costumes like that four hundred years ago...
"Q" (MARINE CAPTAIN): At which time you slaughtered millions in silly arguments about how to divide the resources of your little world. And four hundred years before that you were murdering each other in quarrels over tribal god-images. And since there have been no indications that humans will ever change
PICARD: But even as far back as that costume, we had begun to make rapid progress.
"Q" (MARINE CAPTAIN): Oh? Shall we review your "rapid progress"?
The "Q" visitor moves a hand again to create THE SAME
SOUNDS and the SAME BLINDING FLASH, producing the same
human image but this time unshaven and with an UGLY
AUTOMATION LOOK AND IN THE UNIFORM OF A MILITARY OFFICER
FROM THE MID 21st CENTURY WARS. Q's voice sounds a bit
drugged now as he eyes his new costume.
"Q" (21ST CENTURY) (interrupting): Rapid progress to where humans learned to control their military with drugs?
TNG: Encounter at Farpoint
Uniforms that he wears specifically to annoy Picard, Riker and Janeway
"Q" (ADMIRAL): Starfleet Admiral "Q" at your service!
PICARD: You are not a Starfleet admiral, "Q"...
"Q" (ADMIRAL): Neither am I an Aldebaran serpent, Captain. But you accepted me as such.
Riker nods, a hint of the irony of this on his features.
RIKER: He's got us there, Captain.
TNG: Hide and "Q"