I don't think there is a child in the world who doesn't like swings! So, for us as photographers, it's a great place to capture joyful, happy images of our children, with only a few things to worry about :) It's a win - win as far as I'm concerned - your child is enjoying the experience AND you get to play too!
Here's some tips for photographing your child on a swing.
Tip # 1 - Use A Fast Shutter Speed
Swings can actually be pretty fast! I suggest you use a shutter speed that is at least 1/250, higher if you can. If you are shooting in manual mode, then you can simply "dial" in a high number when shooting your settings. However, if you are shooting on AV mode, you'll need to make sure that the camera doesn't choose a shutter speed that is too low, or you'll get motion blur! If in doubt, you can use the "sports" scene mode on your camera, which will automatically give you a higher shutter speed.
Tip #2 - Use Burst / Continuous Mode
I suggest that you shoot in high speed continuous mode (sometimes also called burst mode) so that you can capture a series of images one after the other - this can help you get that perfect moment or expression! You can read more about burst mode here, but bear in mind you can only take so many shots before the card "buffer" is full, so use sparingly :)
Tip #3 - Use A Smaller Aperture
Now, I like a bit of background blur as much as the next person, but action shots, combined with small children and a wide aperture does not a sharp photo make :0(
So, my advice is go close up your aperture a little bit more than you would normally. The only time I would go against this advice is if your child is stationary on the swing (it can be a great place to contain little ones so they don't run off when they see your camera come out)
Tip #4 - Use Al Servo As Your Focusing Mode
Change your focusing mode on your DSLR to Al Servo (Canon) Continuous (Nikon). What this does is tells your camera to try to keep continually focusing on moving subjects - tracking them as they move and trying to keep them in focus. Hold your shutter halfway down whilst focusing our subject, and keep it half depressed as your follow your subjects movement - in this case back and forth, press all the way down when you want to take the picture! It doesn't have 100% guaranteed success rate, but it should help you get more in-focus keepers. Again, if this is not something you feel comfortable doing, using Sport Mode on your camera should give you a good result.
Tip #5 - Play With Your Vantage Point
You can really play with your vantage point to get some different pictures - change your angle (shooting up from below can make them seem much higher than they are!) or use an ultra wide angle (or zoom out on your zoom lens) to get a different look or get in close and photograph the details! Also move around and see if you can get a better angle for shooting your subjects - maybe even shooting into the light to get some cool creative affects!