What time of day is best to visit the Uffizi Gallery or any of museums in Florence or Rome. Is it less crowded when it opens or in the afternoon?
During peak season there aren't too many times when there are no crowds at the Uffizi. Generally however, at least in my experience when I was working for the City of Florence next door, crowds tend to get thinner as you approach closing time (I think they close at about 7 pm now). Lines were always the longest at opening time. That was a long time ago before they invented the pre-booking system they have today, but it's likely that is still the case.
In the several times I've visited the place, I used to go there no sooner than 5:00pm. You may think that less than 2 hours can't be possibly enough for the Uffizi, but when I go to a museum I follow the advice of a famous Italian art critic according to whom you should never visit more than one painting or art work during each visit. In his words, visiting too many paintings is like going to a restaurant and devouring everything in sight at the buffet bar. You'll come out with an indigestion that will make the experience totally awful. I don't go as far as he does, but I like to focus on no more than 10 or 15 max art works in one sitting. That's almost 10 minutes each in a 2 hr visit.
I visited several times on my trip in Sept 2011 and then again earlier this month. Definitely late in the day some galleries were almost empty. I joined the Uffizi (around 60 E, if I remember correctly) which allowed me to enter whenever I wanted with no line. I found several short visits were a nice way to supplement my initial long day there.
Roberto and Sherry give excellent advice, although if you are going to be in Florence or Rome for a short time, you will be tempted to see everything you can. Fight the temptation! Figure out what the museum has, and what kinds of things you like (I love classical, early Christian and Renaissance art, not so much the 18th-19th century stuff). I used to come out of great museums with a headache because I tried to see too much.