The subject of vast confusion.
On at least one point of grammar, American English turns out to be superior to its competitors. The relative pronouns "that" and "which", when they turn up in what the Chicago Manual of Style calls "polished American prose", have clear and well defined uses. "In British English," by contrast, "writers and editors seldom observe the distinction between these two words." (5.202, p. 230)
This is confirmed by Pam Peters' Cambridge Guide to English Usage, where she notes that "which often provides an alternative to that in reference to things," and that in most cases "the choice is purely stylistic". She does point out, however, that even in British English, "the choice may be influenced by the nature of the clause [the pronoun] introduces -- whether it is 'restrictive' or 'non-restrictive.'" (Pp. 576-7) It is the difference between the restrictive and non-restrictive use of these pronouns that I want to emphasize here.
Consider the following example.
(1) In the summer of 1993, Dale Jones and Bill Ewing met for the last time. The meeting, which would prove to be a historic one for Altern Technologies, was held at the Emory Hotel on the banks of the Mississippi.Here the clause that begins with "which" does not restrict the meaning of the words "the meeting", which has been adequately determined by the previous sentence. Note the commas that set it off from "The meeting" and "was held", which indicate that the sentence could survive the removal of the clause in question. We would then have, "The meeting was held at the Emory Hotel on the banks of the Mississippi." That is, the clause is effectively parenthetical.
Here is an alternative formulation.
(2) The meeting that changed the course of Altern Technologies forever was also the last time Jones and Ewing spoke face to face. It was held at the Emory Hotel as a heavy July rain fell into the Mississippi.If we try to remove the qualifying clause introduced with "that" we see how much work it is doing. "The meeting was the last time Jones and Ewing spoke face to face," is all we'd be left with. It is unclear what meeting is being talked about in this sentence, though the definite article ("the") tells us that that it is not just any meeting.
Ironically, we use the word "that" to specify which meeting we are talking about, while the word "which" is best used when we are simply providing extra details about a meeting that has already been clearly identified.
So the rule can be summarised as follows. Use "that" when you want to restrict the meaning of the noun it follows and use "which" (preceded by a comma) when you are providing additional information about the noun which does not restrict its meaning. Thus,
(3) The meeting that I told you to attend has been cancelled.But not,
(4) The meeting which I told you to attend has been cancelled.Note, however, that this is what British writers and editors care less about. You should certainly not write,
(5) The meeting, which I told you to attend, has been cancelled.No one recommends this punctuation if what you mean is (3). But you might, of course, find yourself needing so say something like the following.
(6) The meeting, which I told you to attend, was very important. Why did you disobey me?But note that the words "which I told you to attend" are not intended to restrict which meeting is being talked about. That should already be clear by the time this point is being made.
Note that (6) does not mean the same thing as this:
(7) The meeting that I told you to attend was very important.The difference here may seem needlessly subtle, but it is the purpose of a grammatical rule to allow you to be as subtle as you need to be for given purposes. (7) means "Remember the meeting I told you attend? It was very important." The one before that, however, means something different: "The meeting was very important and I told you to attend it." While the fact that I told you to attend the meeting restricts the meaning of the words "the meeting" in (7), it states an independent fact (6).
Here is one last example of the correct use of "which".
(8) All the top managers at Altern were immediately summoned. The meeting, which was to be held the following Thursday, was soon cancelled, however, because Dale Jones was unable to attend.Finally, note that American usage does not contradict British usage on this point. American usage is always correct under British rules. British usage is more liberal, allowing "which" to replace "that" in (3), giving us (4), while American usage does not. While (4) sounds odd to a "polished" American reader, (3) only sounds less pretentious to a British one. I recommend learning the American rule because it amounts to easily distinguished rules for "that" and "which" when used as relative pronouns. It is less likely to lead to confusions in other cases.
For Peters rightly calls "that" the "workhorse of the English language." It can, for example, also be used as a demonstrative, e.g., "I went to the party. That was a mistake." (Note the difference punctuation makes: "I went to the party that was a mistake.") And as an adverb: "I didn't think there'd be that many people there." But more on that later.