I often take photographs of stained glass, but they come out either as too overexposed or underexposed due to the high levels of contrast between the window which is usually backlit and the frame which can be dark. What are some good techniques and tips for how to take good photographs of stained glass?
How you shoot depends on what results you want. If you simply want to shoot the stained glass then using spot metering to only expose for the glass itself, and experimentation with underexposure using exposure compensation (or Manual mode) should yield decent results. Shooting RAW will give you some latitude in exposure.
However, I personally dislike the 'stained glass floating in black' look because it smacks of tourist snaps. You have a camera that can accurately meter different parts of a scene, and you have a computer and access to software that can seamlessly blend exposures together, so why settle for a shot you can take with a 35mm disposable?
Mount your camera on tripod (or beanbag if the church is fussy about tripods), compose your shot, and activate spot metering. Take a properly exposed shot of the glass. Now move your metering spot to meter for the stonework and take a properly exposed shot of that. Then composite them together in your software of choice - the neatly defined edges of the windows should make this relatively easy.
In terms of composition, if you want to take a shot of an entire window, I recommend getting as square to it as possible - stained glass windows tend to be symmetrical, so shooting from an angle rarely looks effective. But that is up to you. Shooting square on means that the window should all be in the same focus plane so, assuming you are using a tripod (and you should) aperture doesn't matter a great deal. When cropping, ensure the photo is perfectly straight - the strong verticals in most windows will make any odd angles very obvious.
This is all assuming you want to capture an entire window. If you are looking to capture details, things become simpler - a decent 35 or 50mm large-aperture prime, or a good zoom, and matrix metering should be able to handle most situations.
This is a great place to try HDR. I've done a lot of shooting at a workshop where they make blown glass (and other pieces), and although I love the light streaming in via the old windows in the shop, it's impossible to properly expose for both the window light and the artwork. I've had good results using fill flash for non-specular subjects (ie, people) under these conditions, but adding flash to glass is really difficult to do with portable equipment.
Instead, with shots like the following, I shot a bracket of exposures and compressed the tones into a single exposure.
I also enjoy taking photos of the brilliant colours that are often in stained glass. Yet the main problem I have is, like you, getting the vivid colours to show up in all their glory. One of my favorite techniques is setting the Exposure compensation to about -1 to -2 EV and strictly exposing on the glass itself. This works best when the glass is brightly back-lit, e.g. with the sun shining directly on it without clouds or shadows. A disadvantage of this technique is that it often obscures the detail around the glass, which can often be important for the photograph.
Here I used exposure compensation of -2 EV.
Another technique is adjusting the aperture to control depth of field. Using a small aperture will allow you to get the whole window in focus, while using a large aperture will allow you to highlight a particular feature of the window.
Depending on the scale of what you're shooting, you could add more light to the scene with a flash gun or studio strobes. If you balance the light level between the strobes and the light coming in from outside, you'll get a much more natural result than with HDR or post-processing techniques.
Another tip would be to shoot on overcast days or in the early morning or late evening when the light will naturally balance itself.