Writers often use “which” when they should use “that.” The reverse is also true. It took me a while to learn this myself. This post offers some guidance on your choices.
The “That” rule
“That” is for essential clauses. The sentence doesn’t make sense without the clause.
Take a sentence like the following:
Inflation that rises rapidly may hurt bond prices more than gradual inflation.
Omit “that rises rapidly” and you get “Inflation may hurt bond prices more than gradual inflation.” Does that make sense? No! Thus, “that” is required to reflect the presence of an essential clause.
The “Which” rule
“Which” is for nonessential clauses and requires at least one comma.
Consider the following example:
Inflation was rising rapidly, which was inflicting pain on bond holders.
Delete “which was inflicting pain on bond holders” and you still have a sentence that makes sense: “Inflation was rising rapidly.”
The British exception
The British have different rules for the use of “which” and “that.” As Shea Ammon states in Bad English: A History of Linguistic Aggravation, they use both for essential clauses. However, they agree with Americans on using “which” for nonessential clauses.
For another take on which vs. that, read my post “The Which Trials” according to “Woe is I.” That post also contains links to more resources on which vs. that.
Note: The title of post was edited on Feb. 24, 2015, when I learned that “that” and “which” may not be considered pronouns in this context.