When I first started out taking photographs of dragonflies and damselflies I was more than happy just to get a sharp image of the subject and didn't really take much notice of the background.
Now I give the composition of the image a lot more thought. It is not always possible to achieve the perfect composition because you have no ability to control where the subject perches.
Some Useful Tips
Here are a few tips that I have found useful. Always have the sun behind you as it will illuminate the subject and bring out the natural colours to the full but beware of the glare from the sun on the wings. This glare can be eliminated just by moving the angle of the shot either slightly up, down or to the sides.
If at all possible avoid confused backgrounds and especially those with bright colours in, for example flowers. A bright object, whether in or out of focus in the background will confuse the overall picture.
Also try to avoid shaded or dark areas in the shot as these will detract from the quality of your image, the eye being drawn to the blackened areas.
One of my main hates are water droplets for dew drops in the frame. When these are illuminated by the sun light it will result in bright sequin like dots all over your image. These are in my opinion real spoilers and should be avoided at all costs. One or two can be cloned out but I'm not a avid fan of this post capture editing process.