because it seemed like it would be a lot smaller of a target. Also, they could get up when they needed to move
Edit: Please look at the other answer by GeneralLeeBlount. It seems better researched then mine.
Because they could not reload in a prone position. The firearms up to the middle or late 19th century were nearly exclusively muzzle loaders. So you had to insert the munition from the front of the barrel and then ram it down into it. This was a pretty complicated procedure to start with (if done completely by regulations it could consist of over a dozen steps) and just not feasible while lying down.
This was one of the great advantages the introduction of breech-loading rifles brought with them. The battle of Königgrätz was between the Prussians with breech-loading Zündnadelgewehren and Austrians with muzzle loaders. The difference in rate of fire and the ability to fire and reload while prone had a significant influence on Prussia's victory.
Further reasons against lying down included the time delay when manoeuvering since the troops had to stand up first. This seems like a trivial thing but the delay was longer than you would expect since it would not only take time to stand up but the bring the whole formation in cohesion again. Manoeuvering large formations was not easy in the best of conditions and required hard drill. The troops had to act as one and as such the chaos brought into it by standing up was significant. Furthermore manoeuvers could be pretty time critical for example when a cavalry attack was imminent. Forming square formation was a very demanding manoeuver and often had to be performed very fast. There were many instances where units could not form square in time when deployed in standing line position. Lying down would not improve this.
That being said the troops with muzzle loaders where not standing the whole time. Especially when waiting on the enemy infantry to attack and being under cannon barrage, troops would often lie down to minimize casualties. Wellingtons "reverse slope defence" (basically commanding a ridge and having your troops positioned on the slope opposite to the enemy so they could not be fire upon) used this tactic very effectively in the Peninsular War and at the Battle of Waterloo.
In contrary to popular depiction, they did. The British had called out for their soldiers to "lay on their arms" since the War of Austrian Succession in the 18th Century. It was used under severe fire from enemies and to safely return fire. It is possible to reload muzzleloading flintlocks while laying down, it does take more time though. The British army was not this stagnant machine that did not adapt to how warfare or a battle changed. There are some primary sources of soldiers being ordered to lay down and fire/wait for the enemy to shoot.
Thomas Sullivan of the 49th at the Battle of Harlem Heights: "The Cannonading continued at both sides for an hour... All that time out Brigade i.e. 2d., lay upon our Arms in a field of Indian corn..." Another by Thomas Glyn of the Brigade of Guards describes the same at the Battle of Brandywine. The battalion companies did this along with the light companies. The first light infantry battalion at Brandwine had orders to lay down on their arms and fire. "...we were compelled to throw ourselves on our knees and bellies, and keep up a fire from the slope of the hill." This was part of the ascension of the hill and effective enough to drive back rebel forces from constant fire. So while it may have been slower to load, the forces laying down had the ability to keep up a good fire. I will add that it was not this sole movement that won the battle but also a coordinated attack from the left flank of grenadiers. The light infantry, whether on company or brigaded battalion level, did act differently that "hat" or battalion companies but with the description of Sullivan and Glyn, one can see that it was a practice done by line infantrymen in the British army.
British officers did order soldiers to use cover as well. Their practice of warfare did not always solely mean standing in line formation. Even battalion companies would use "light infantry tactics" in the American War of Independence. The 71st Highland Regiment had standing orders that if "the battalion is commanded to engage in a wood or thicket or country...are immediately to occupy every tree stump log bush bank cliff hedge wall or in short any kind of covering which can afford them tolerable shelter from the enemy."
As well as:
"...but that every Soldier hug their coverts int he most compleat manner possible for Giving annoyance to the enemy & perfect Security to themselves. If the troops are ordered to move in any direction they are to Spring from tree to tree, Stump, log &c &c with the utmost agility and continue to fire load & Spring as they advance upon or from the enemy."
Officers also ordered men to lay down on arms as the enemy fired and then to spring up to present and then fire their own volleys. This happened in the field and in the woods. The light infantry employed this tactic the most as part of their aggressive fighting style and to apply effective firepower with their own security. Captain Mathew Johnson of the 46th Regiment's light company used this tactic at the Battle of Harlem Heights.
I will agree with the other n31415 that breechloading guns helped with the use of prone firing but it did exist in the 18th century. It appears to have been a common practice between both battalion and light infantry, and so far I have not found a drill manual with it but officers had tactical independence in a battle and this offered a way to protect their men from enemy fire. I'd be interested to see if other forces employed this tactic in the 18th century such as Germanic or Americans, but with the sources I have, I know the British used the tactic to good effect.
Sources:
Alex Burns, "Lay on your Arms!": The British Army's Use of Cover in the Eighteenth Century," https://kabinettskriege.blogspot.com/2017/07/lay-on-your-arms-british-armys-use-of.html
Matthew Spring, With Zeal and Bayonets Only: The British Army on Campaign in North America, 1775-1783, 186-199.
71st Standing Orders, New York June 1778.