Perhaps most typically, kettlebell swings and dumbbell swings are used for cardiovascular or strength-endurance training. They're done with a moderate weight, for time or higher reps, with the goal of upping the reps.
What about as a strength exercise?
Can you use a swing for strength?
Short answer: Yes.
Instead of selecting a weight you can control fully even many reps into a set, aim for something heavier.
You still need a weight that's light enough. Remember this is a power exercise, much like a power clean or kettlebell snatch. The weight of the kettlebell or dumbbell will effectively be multiplied by your hard backswing on the exercise. You want to be sure it's a weight you can fully brace your abs and lower back against. A good guideline is that if it's a heavy enough weight that you couldn't sumo kettlebell deadlift it for over 10+ reps, it's probably too heavy for a solid swing. If you can't easily control it just as an up-and-down motion the swing is going to be difficult.
On the other hand, you want it heavy enough that you don't have a lot of reps in the tank when you finish. The goal is a hard, powerful swing, using as heavy of a weight as you can safely manage.
How many sets/reps?
A 3-4 sets of 6-8 reps is a solid weight for heavy kettlebell swings. You could go heavier, but it's hard to get a good, hard snap on a weight that you can only do for 3-5 reps. For that level of weight, I find it's better to go for a weighted jump, a power clean or hang power clean, or just simply to deadlift a heavier weight.
Any last tips?
Remember when doing a swing the goal isn't to swing it up with the arms, but to load the hips with the backswing and to snap the hips to get the glutes to fire against the weight. Don't worry about where the kettlebell goes, or how high it goes, but how hard you need to brace against the weight at the bottom and how hard you snap your hips.
I also find a two-handed swing is a bit better, because you can go for a somewhat heavier kettlebell or dumbbell, and load the hips and shoulders equally.
The heavy swing can be a technically easier power/strength exercise than a power clean, and it's a bit friendlier to those with shoulder injuries. However it's not without a need for skill - treat it with respect, and treat the swings like any other high-weight lift.
Remember that although high-rep swings can be productive, high rep isn't the only way to do the swing.