I peg in two situations.
When skipping, you want the weight and bait to stay together, or it just doesn't work.
pitching to heavy cover, I like to have an unpegged weight when possible, but the weight wants to fall faster than the lure. You need to keep them together so you can feel most bites. If the lure's a foot away from the weight,two things happen. You feel more what the weights doing and less of what the lure's doing, and you end up with more line that you have to move to get a hookset. Picture it, when the weight falls faster than the lure, your line goes down from the rod to the weight, then up to the lure. If that distance from the weight to the lure gets to be too far, you're not going to be able to get the line tight enough to set the hook.
If I feel like I can keep the weight tight to the lure, then I'll not peg it. When the fish bites, I'd rather have the fish pull line through the weight and only have the bait itself in its mouth. If the weight gets into the fish's mouth, I have to pull the weight out to get a hookset, that means the fish's mouth has to open a little, giving more chance for a missed hookset.
At the same time, if the weight seperates from the lure before the bite, the fish might bite the weight itself, 100% guaranteeing a missed fish, or if it hits the bait, my connection to the bait is disrupted and i might not feel the bite as well.
There are times to peg and times not to peg. You have to figure out what those times are to you.