There are several factors that will help decide whether to use hammering or drilling pegs:
Ground: If the ground is hard and solid, pegs for driving in can usually be used well. However, if the ground is soft or sandy, drilling pegs are often a better choice as they stay anchored to the ground better.
Wind: In windy areas, pegs for drilling can be more stable as they are anchored deeper into the ground and are therefore less likely to be pulled out.
Weight: Drive-in pegs are typically lighter than drill pegs, making them a good choice for hikers and other people who need to be mindful of the weight of their gear.
Cost: Drilling pegs tend to be more expensive than hammering pegs.
Pegs are a good choice when camping on hard ground as they are easy to drive in and provide a strong connection. However, they are less suitable when camping on soft ground as they may not penetrate deep enough to provide adequate stability.
Bores are a good choice when camping on soft ground as they penetrate deeper into the ground and provide better stability. However, they may not be as easy to install as pegs and may require additional tools, such as a drill.
If you are unsure you can use both and combine pegs and holes to ensure your tent is secure and stable.