Hamstring injuries commonly occur with ballistic muscles actions. The sprinting and kicking involved in AFL often leads to hamstring injuries.

The swing is a great exercise to prehab hamstrings against injuries. It does this by:

Improving muscle balance: It is common to have stronger quads than hamstrings. This increases the chance of injury because the hamstrings have to decelerate the movement created by the quads. E.g. when kicking a ball your hamstring will be relaxing when your quads are working hard, then they have to switch on hard to prevents joint injury at the end of the movement. So if the quads create to much power for the hamstring there will be an injury.

Strengthening your glutes: Weak glutes also predispose you to hamstring injury because your hamstring will be over worked. The glutes powerfully extend the hip, as the hamstring also preform this action. Stronger glutes will reduce the load on the hamstrings.

Improving your fatigue resistance: the more fatigued you get the high chance to injury. The swing is a great power endurance exercise and the added bonus of strengthening your glutes also increase the hamstring fatigue resistance.

Strengthening throughout a full range of motion: kicking uses your hamstrings full length and injuries commonly occur at end range. Strength training increases strength an extra 5-20 degrees beyond the range of motion being used.

Build up the muscle elasticity: The swing involves fast movement using the stretch-shortening cycle. This helps build up the muscle elasticity which will also strengthen the hamstring against injury.

Ok, thats all well and good, but not all swing are the same. You need good form to get all the benefits of the swing. So if your swing looks like a squat or your rounding your back, it unlikely you will be getting the benefits I have listed. You should and get advice from someone that knows what their doing or good DVD.