Honestly, I have trouble keeping them up, and keeping up with them.
In our rural department, we can get away with cowboy hats, and I keep one in the car for working traffic. I even blogged on it once,
HERE, and posted a picture.
I've a friend that's a cop, who swears he used to keep a derringer in his hat, but that sounds unstable; no way to secure it well.
For traffic and animal control, a hat is good to wave while hazing cattle and confused drivers (really, I hate to say it, but there's not that much difference, sometimes) to where you want 'em to go.
In heavy sun, they're mandatory with hot dark uniforms and vests.
Hats interfere with getting into and out of a car frequently, and project your movement around corners, over sills, etc. Big brims keep your face from walls.
Caps are easier to keep tucked in a patrol bag or on the back package tray. The brim is invaluable, sometimes, when you're watching an area that lies between you and the setting sun.