A 6'2" soldier would have a greater advantage over a 5'7" soldier. Increased mass equals more muscle, more reach, heavier weapons, and heavier armor. So would a very large person be equipped differently? Such as a long sword and no shield to compliment his arm reach? How would a short person be equipped? I imagine they would strive to be lightly armored and compliment speed and agility.
Yes!
Height was actually a major factor in armies in the late early modern and beginnings of the modern era. Notably, the Napoleonic Wars. I'll speak specifically about Napoleon's forces: There would be 6, give or take one, companies in a Napoleonic infantry battalion. These would be comprised of 1 of grenadiers, 4 of line infantry, and 1 of voltiguers. The give or take is in regards to the line infantry. Where you would end up in this setup would rely almost exclusively on your height.
Voltiguers are the tiniest fellows between 4'10 and 5'2 imperial inches (the one's we are familiar with). They are the skirmishers of the French army and would require to be fleet footed and quick thinkers. These are arguably some of the most intelligent men in the battalion as they are required to act in small teams and without much direction from an officer. That is because they were so spread out an officer, unlike with a compact line company, could not deliver orders to all his soldiers within one earshot. They have to be able to know when to seize initiative or when to retreat and where to take cover and when on their own.
Fusiliers, the line infantry, would be between 5'2 and 5'6. This was the average height at the time for most Europeans. You may think this is incredibly short, and it is for us, but back then they did have the same diet as us. Notably, a heavily meat based and vitamin packed one in their developmental years that would allow growth to our modern standards. These were by no means special men and just those packed into tight formations and kept under the watchful eye of their officers and NCO's. These are the guys you typically think of when you think of this era of warfare as standing in a line and firing off at each other.
Grenadiers were the "shock troops" of this period. They were required to be at least 5'6 and generally tended to be between 5'7 and 5'10. They would also wear tall bear skin caps, those things those often mocked British soldiers outside of Buckingham Palace wear. These would also add to the height and add an imposing nature -- giving them a "total" height of well over 6 foot. As you might imagine this would be intimidating to your average line infantry that they would be fighting against who would be on average around 5'4 or so. These men tended to favor the bayonet charge as you might imagine from their physical nature. These would be the first in and the last out in a sense, those meant to cause great damage early on and to salvage a battle late in if it's getting dicey.
A small note is that Grenadiers would in Napoleon's army require a certain number of campaigns participated in and years of service. Thus if you were 5'7 or whatever you were not immediately trained as a Grenadier, you would be put into a Fusilier company and required to serve there as likely the tallest guy until you are siphoned off into a Grenadier company. As such, newly formed Battalions had no Grenadier company as there were no experienced troops yet.
There would be similar systems, of course, for his adversaries across Europe with similar requirements.
Notes:
"Swords Around a Throne: Napoleon's Grand Armee" by John Elting is really the best source for this as it goes stupidly in depth for the specifics of each branch of Napoleon's army and the requirements, training, life, and tactics of them all.
You might enjoy reading about the Potsdam giants as well, it was a Prussian unit comprised of extremely tall men.
I do wonder what it was like to be tall in world war one or world war two though. Surely you wouldn't be send to a trench if your head would constantly be sticking out?