Generally speaking the longer barrels do tend to pattern somewhat better and will give slight increases in velocity. The velocity thing is very slight, like maybe 5 - 10 fps per inch of shotgun barrel depending upon the load. With field loads there is less of a difference than with a heavy magnum type load. This makes the velocity factor pretty much a non-issue when considering common hunting lengths like the difference between a 23" turkey specific barrel and a 26" wingshooting/general use barrel. For predator or turkey specific I really like 24" barrels with a close second being a 26" length.
Patterning is much the same kind of deal. The differences in individual barrels and chokes and how they react to a certain load can negate any advantage length may play in giving a better pattern. As an example, I have 18 1/2", 24", and 26" barrels for my two Benelli M1S90 semi-auto 12's and they all take the exact same chokes. The 24" and 26" are pretty much even in pattern densities with no clear advantage to either one. Most of the time both of those two will out pattern the shorter 18 1/2" barrel. Sometimes by a great degree, sometimes by not so much. However, in at least one instance the shortest barrel will out shoot the other two with a certain load and choke. Which reminds me that there are no set hard and fast rules and I always try to speak in general terms.