Why is there a line of volcanoes along the northwest coast of North America?
The Cascades (the volcanic range that Mt. St. Helens and Mt. Ranier are a part of) are "arc volcanoes" (a.k.a. "a volcanic arc", etc).

Volcanic arcs form at a regular distance (and fairly regular spacing) behind subduction zones.  Subduction zones are areas where dense oceanic crust dives beneath more buoyant crust (either younger oceanic crust or continental crust).

The down-going oceanic plate begins to generate fluids due to metamorphic reactions that occur at a particular pressure and temperature.  These fluids cause partial melting of the mantle above the down-going slab.  (Contrary to what's often taught, the oceanic crust itself doesn't melt at this point - it's the mantle above it that does.)  

This causes arc volcanoes to form at the surface at approximately where the down-going oceanic slab reaches ~100km depth (I may be mis-remembering the exact number).

However, there's an interesting story with the Cascades, the San Andreas Fault, and the Sierra Nevada.  

Basically, Sierras are the old volcanic arc before an oceanic spreading ridge tried to subduct off the coast of California. (Search for the Farallon plate.) The ridge was too buoyant to subduct, so subduction stopped, shutting off the supply of magma to the volcanic arc.  Because the motion of the Pacific Plate (on the other side of the spreading ridge that tried to subduct) was roughly parallel to the margin of North America, a strike slip boundary formed instead: The San Andreas Fault.  Northward, there's still a remnant of the Farallon plate that's subducting beneath Northern CA, OR, WA, and BC.  Therefore, the Cascades are still active arc volcanoes, while the Sierras are just the "roots" of the old arc.