There are a lot of films which include some form of hat manipulation. A pretty good list of these can be found at http://www.blanketfort.com/juggling/hat.html#resources
The following films have been personally recomended to this site.
Funny Bones (1995) - Staring Lee Evans. Apparently there is a lovely hat routine in it. (According to Mini :-) but I haven't seen it yet.
Benny & Joon (1993) - Sweavo reports that this one features a chasing-the-hat-around-the-floor set piece.
Duck Soup (1933) - Marx Brothers film which includes a 3 way hat swapping sequence.
What Women Want (2000) - Ben and Yvette at Serious Juggling report that Mel Gibson performs some simple hat tricks
The Music Box - The Void reports that Laurel And Hardy do "A little bit of wearing-each-others-hats-which-are-the-wrong-size visual comedy" and Stan Laurel Does A "Stetson"