I think that most photographers choose the focal length they shoot at primarily based on the desired size of the subject in the frame. Want to get a head shot from far away, use a long lens. Want a full body shot in a confined space, better have a wide-angle lens handy. Today, I'd like to talk about another criteria to consider in choosing your focal length: subject isolation.
In portraiture we usually want the subject to stand out against the background. Experienced portrait photographers don't just look at the subject, they look at the background as well. They try to compose their images so that their backgrounds aren't that too cluttered or colorful or so interesting that they draw the viewer's attention away from the subject. They also tend to shoot at wider apertures to minimize depth-of-field, which allows them to blur the background while keeping the subject in sharp focus. Longer focal length lenses can help on both counts. To explain why, we'll need to introduce a bit of geometry.
The magnification factor
If you've ever bought a pair of binoculars you're probably familiar with the concept of a magnification factor -- "Acme's new MegaPro binoculars have 20x magnification!" In photography, the magnification factor refers to the size of the subject projected onto the camera sensor relative to the true size of the subject. It can be calculated in two ways. First, by definition, it is the ratio of the size of the sensor to the size of an object that would fill the sensor if placed at the subject distance. When shooting portraits, the magnification factor can usually be taken as given. For example, if you want to take a close-up head shot using a full frame camera, you might choose to go with a magnification factor of about 0.11 so that a subject one foot across will fill the 35mm wide sensor (35mm / (12in * 25.4 mm/in) = 0.11). Second, if the subject is not too close to the camera (i.e., it is not a macro subject) then the magnification factor (M) is simply the ratio of the lens focal length (f) to the subject distance (d). M = f/d. Using this fact, you can determine in advance how far away from your subject you'll need to stand and/or what focal length lens you'll need to use to achieve your desired magnification factor.
Less (background) is more
To see how using a longer focal length lens can help to minimize clutter in the background, look at the figure below. It shows how the same scene might be rendered differently, depending on whether we use a short or long lens. In both cases, the subject will appear the same size and will fill about half the frame, but in the case on the right, where a long lens is used, much less of the distracting background will be visible in the image. To get the same uncluttered background using the shorter lens, both you and your subject would need to move closer to the background, which creates problems of its own.
What's going on here? Well, in both cases the magnification factor measured at the subject distance is the same. Let d1 and d2 refer to the camera-subject distance in the first and second examples respectively. Let f1 and f2 be the lens focal length in each example. I've drawn the diagrams so that both compositions have the same magnification factor at the subject distance (M1 = M2), which is the same as saying that f1/d1 = f2/d2. Rearranging terms, the last identity implies that f1/f2 = d1/d2. While the subject magnification factor is the same in both examples, the background magnification factor is not. If d1' and d2' are the camera-background distances in each example, then it's easy to see that d1/d1' < d2/d2'. Rearranging terms yields d1/d2 < d1'/d2'. But since the lens focal lengths haven't changed, it must be the case that f1/f2 < d1'/d2', so that M1' < M2'. Holding subject magnification constant, the background appears more magnified when the photographer stands back and uses a longer lens because the relative difference between the camera-subject distance and the camera-background distance is less.
More (blur) is more
Another way to simplify your background is to blur it so that its details cannot be discerned by the viewer. To this end portrait photographers often seek to narrow the distance in front and behind the subject that is rendered in reasonably sharp focus. The details of how depth-of-field is determined are quite interesting and will be the subject of a future blog post. For now, what's relevant to know is that DoF can be expressed as a function of aperture and the magnification factor. It is well known that, all else equal, shooting at a wider aperture produces a narrower DoF. What is somewhat less widely appreciated is that shooting at a higher magnification factor also produces a narrower DoF. Interestingly, if you hold aperture and the magnification factor constant, DoF will remain more or less fixed. So if you use a 50mm lens and stand back 5 feet or a 100mm lens and stand back 10 feet, you'll get pretty much the same DoF at any given aperture. This is an important fact to know, and one which is often misunderstood. i misunderstood it myself until I was schooled by more experienced photographers.
Longer focal length lenses to do not render narrower DoF at a given aperture, at least not when the magnification factor is held constant. What they do do, however, is make objects that fall behind the region of sharp focus appear to be more blurred. Why? Because if you magnify an object that's out of focus, that object will appear even more blurry. Anyone who's cropped in to a poorly focused image will recognize this fact immediately.
The photographs below illustrate how a longer focal length lens can help to isolate the subject. The top two pictures of yours truly were taken with a 45mm lens and the two on the bottom were taken with a 90mm lens (all four images were taken with a crop frame camera body). Looking at the photo on the upper left, you can see my cluttered dining room table and the high chair in the corner. In contrast, in the photo on the lower right, you can only see the curtains and the back wall, and these are rendered rather blurry at 90mm and f/4.
Holding subject magnification constant, a longer lens will show a more magnified background, which helps to minimize clutter and isolate the subject. Because background objects will be more magnified, they will also appear to be more blurred if they fall outside of your chosen depth-of-field. Both these facts mean that longer lenses may be preferable for portrait work, provided you're confident that you'll have enough room to back away from your subject.
If you'd like to learn more about focal length, DoF and blurring your background, I recommend this site.