This is a question that tends to come up quite a bit.
In short linear tactics dominated primarily due to practical reasons and the limitations of early firearms. While skirmishing did happen at times, tight line formations were far easier for generals to command in a pitched battle and they made it far easier for officers to keep an eye on their soldiers and ensure that they were fighting effectively. In addition, because muskets had a low rate of fire and a relatively short effective range large armies could achieve a far greater concentration of fire by packing soldiers shoulder to shoulder than they could if they were spread out thinly over a large area.
You may be interested in these discussions I've answered.
Any further questions feel free to ask! It would be a pleasure.