I always hear that early firearms were very inaccurate, even up until muskets. When did weapons become accurate enough to be relied on outside of large firing lines? Was it the rifled barrel that changed weapon accuracy so much or was there a breakthrough before that?
Sporting muskets were more accurate than military muskets.
Modern firearm enthusiasts who hunt with 18th century fowlers (as sporting muskets were called in the American colonies) report them accurate to 60 yards against game like deer and bear. This is not as accurate as contemporary rifles (accurate to 200 yds in the hands of a skilled marksman), but pretty accurate.
The reason fowlers were more accurate than military muskets was that military muskets were deliberately made less accurate to reduce the problem of barrel fouling, while this was not a problem with sporting muskets.
A fowler was a smoothbore firearm generally lighter than a military musket. They were capable of firing various loads from "birdshot" like a modern shotgun, to bullets. The greater accuracy of the fowler was because the bullets were cast to fit the barrel more tightly.
Military muskets were built to fire 50 or more rounds in an engagement, without the black powder fouling the barrel and making further shots impossible until the gun was cleaned. Black powder is very fouling, so this required a bullet somewhat smaller than the barrel so that the gun could still be loaded and fired after numerous rounds. These gaps between bullet and barrel reduced the accuracy and range of the gun. A .69 ball was the standard military bullet for the .75 caliber bore Brown Bess musket.
http://allthingsliberty.com/2013/07/the-inaccuracy-of-muskets/
Military muskets were also generally heavier and more rugged than fowlers, and could be fitted with bayonets.
A modern enthusiast, shooting a Brown Bess (shooting offhand, rather than from a rest, and using a .715 ball, rather than the military standard .69 ball) reports a 20 inch group at 50 yards, which is not great (but not really comparable to the grouping data I report later for the fowler, because of the offhand shooting, which will increase the group size by some unknown amount, depending on the skill of the marksman). (He also reports that he shot 40 rounds and towards the end, the gun was becoming fouled and difficult to reload, which illustrates why the military used the .69 ball.)
http://www.rifleshootermag.com/rifles/featured_rifles_bess_092407/
Fowlers, were designed to be used for hunting. It was likely that only a few shots at a time would be possible against game targets, then the gun could be cleaned. Therefore, bullets were cast with tighter barrel tolerances and fowlers were more accurate than military muskets.
The first source reports shooting 4.5 inch groups at 50 yds from a .62 caliber fowler, loaded with .595 ball. Which is pretty good accuracy. (Comparison with a modern rifle: A rifle is generally supposed to group at least 6 MOA (minutes of angle) or better - lots better for a match rifle (lower is better). 6 MOA would give a 3 inch group at 50 yds. 4.5 inch group at 50 yds indicates 9 MOA.)
Fowlers were imported to the American colonies in large numbers (The largest numbers being "trade guns" to sell to the Indians for furs) from France, Britain, the Netherlands and Germany, and were also made by American gunsmiths.
Fowlers were most often in .60 or .65 caliber. They were often used for hunting deer, and were particularly useful for hunting birds like turkey, pigeons or water fowl such as ducks or geese, when loaded with shot like a shotgun.
The fowlers were also used for defense, and by the militia, although some militia were equipped with military muskets instead.
The Minutemen being armed with fowlers, while the British Regulars were armed with military muskets, may have contributed to the success of the American sniping attacks on the British column as it retreated towards Boston after the Battle of Concord, at the outbreak of the American revolution.
Fowlers were more accurate at longer ranges than military muskets.
Advancements in accuracy came along in the 19th century with rifled barrels and the Minné ball which expanded inside a musket when fired and was sent into a self correcting spiral by the rifling. Though this advancement did exist previously it was not widely available to any extent. Before rifling and the Minné ball (which was rather coneshaped not ball shaped) a musket ball would basically bounce around inside the barrel of a gun. The next major advancement was a self contained cartridge in which the projectile and propellant were encased in a single shell so to say like modern ammunition is today. This allowed for weapons to be specifically chambered to fire their projectile that now fit better and shot more accurately in addition to the ability to fire faster as the powder and projectile did not have to be loaded separately. Lock and Load with R. Lee Ermy did a great episode on the evolution of guns in an episode called hunting rifles.