If I had a choice between a regiment of soldiers with powder guns, and an equal size collective of longbow men, it seems like the longbow would massacre those using guns and wearing such little protection (and at a much further distance, with a higher rate of fire), right?
To tack onto the other reply you have to realize armor was only abandoned 200 full years after guns began to take reign. Guns were used with conjunction with other weapons in heavily armored formations; armor which had made bows all but useless weapons. Even by the middle of the 1500s an English Longbow could not do much to standard armor and most bows were not the Longbow. We can even go back to the Crusades and read accounts of Crusaders simply eating arrow after arrow hitting them dead center of mass and them just doing nothing. There is a reason just about everyone could abandon the shield by the 1500s with relative safety; it was a redundancy.
By the time of the 1700s and late 1600s when armor began to become a redundancy itself in the face of rapidly expanding musketry technology (as it did little to stop it) it was abandoned for more maneuverability. Again; there is a reason that until light Kevlar vests that modern armies did not wear armor...it was more or less more harm than good.
At this point, yeah, they're vulnerable to arrow fire but you know what they're equally vulnerable too? GUN FIRE. I don't mean to be snarky but really I do not get why people put this romantic idea of the bow and arrow as the ultimate trump card against armorless gunmen. Those same armorless gunmen, up to the point of modern assault weapons, were wearing just as little armor but were dealing with guns. Yeah they were vulnerable but they were quick and packed a crapload of firepower.
At the end of the day a musket formation can do everything a row of longbow men can not. A musket battalion can defend a hilltop from enemy cavalry or from a pike or a bayonet charge. They can hold a position. They can take one too; the bayonet charge was a dangerous weapon and could rapidly seize fortified positions. They could defend themselves against about anything from the battlefield as long as they had cohesion. What could a bowman do? They can't seize hilltops or defend them and they can't defend themselves; they are an ancillary tool meant to support the main force who is doing those things. The musket was the age old solution to the common problem: simplicity is better. Having two or three distinct groups of men with distinct roles who don't overlap may be effective in specific circumstances but a monolithic group who is average in all roles but can do all roles, and cheaply, is good in all.
At the end of the day musket armies in the 15th century wiped the floor with bow and crossbow armies; battles like Pavia are testament to this. The transition was not instant and whenever a musket army of roughly equal strength met one which relied on bows or crossbows the former would just, no contest, win almost every single time.
You may be right about arrows being initially more effective than guns - however, it takes a comparatively long time to train an archer, and more so a longbowman. English longbowmen were famous for their skill, because adult males were required to spend hours a week learning how to shoot them:
"...every man in the same country, if he be able-bodied, shall, upon holidays [ie on Sundays after church], make use, in his games, of bows and arrows... and so learn and practise archery."
In contrast, gunmen require comparatively little skill and training, simply needing to be taught how to aim (and aim straight rather than in an arc like an archery regiment would need to do) and how to light their powder. Also, guns have much more of a psychological impact, because unlike bows, each time they are fired, a musket or arquebus will let out a loud "BOOM", which would terrify an army unused to gunfire. Subsequent developments in firearm technology would go on to outdo all of the advantages that bows have (reducing misfires, longer range) and also require much less skill to use.
hi! you'll find more on this in the FAQ