When is it appropriate to use that as opposed to which with relative clauses?
That and which are interchangeable when introducing integrated relative clauses. Although some grammar mavens (i.e., people who hold forth on such topics but know little or nothing about linguistics) and copy editors will insist otherwise, the rule is completely bogus.
See, for instance, Language Log on that vs which, written by the co-editor of The Cambridge Grammar of the English Language.
Practically speaking, it is not something that any normal person will generally notice or follow in spoken English and it's frequently — and rightly — ignored even in literary writing. So even from that point of view it's not worth worrying about.
Well, the difference is slight but real. According to the New Oxford American Dictionary:
In U.S. English, it is usually recommended that which be employed only for nonrestrictive (or nonessential) clauses: the horse, which is in the paddock, is six years old (the which clause contains a nonessential fact, noted in passing; the horse would be six years old wherever it was). A that clause is restrictive (or essential), as it identifies a particular thing: the horse that is in the paddock is six years old (not any horse, but the one in the paddock).
Note also that the word that can be omitted where it introduces a subordinate clause:
He said he was coming. [He said that he was coming.]
But it is required when it is the subject of the clause:
The family that plays together stays together.
More usage notes from NOAD:
Is there any difference between the use of that and which in sentences such as any book that gets children reading is worth having, and any book which gets children reading is worth having? The general rule is that, in restrictive relative clauses, where the relative clause serves to define or restrict the reference to the particular one described, that is the preferred relative pronoun. However, in nonrestrictive relative clauses, where the relative clause serves only to give additional information, which must be used: this book, which is set in the last century, is very popular with teenagers, but not this book, that is set in the last century, is very popular with teenagers.
Actually, there's more to this than mentioned in some other answers. The word that is a subordinator; it is not a relative word like who, where, when, or which. Even in integrated relative clauses, they are not always interchangeable. When the relative construction follows a fronted preposition, only relative words will do, so relative pronoun which is available, but that isn't.
We have to protect the environment in which we live.
No art can be properly understood apart from the culture of which it is a part.
Conversely, when the relative clause is post-modifying superlatives, we can choose between that or no subordinator, but which is not possible:
He's the best (that) I've ever seen.
He's the fastest runner (that) I've ever seen.
Also in cleft sentences with prepositional phrases like the following, only that is available.
It wasn't for you that I bought it.
It was from John that she heard the news.
Finally, which usually cannot be used where other relative words would work, but that typically can:
They gave the prize to the girl that spoke first. [who]
He was to leave at the time that she arrived. [when]
They looked every place that she could be. [where]
That's not the reason that she resigned. [why]
I like the way that she plays. [*how]
Generally, "that" goes with restrictive clauses - those where the information provided in the clause is necessary to identify the subject: "The beer that belongs to me" (as opposed to all other beers in the world).
"Which" goes with non-restrictive clauses - those which give information but which do not define the subject: "The beer, which was a little warm, was still tasty."
It's not the most authoritative/formal source ever, but the grammar book Woe is I provides an easily remembered rule of thumb that has stuck with me through the years:
"Commas, which cut out the fat, go with which, never with that."
In this particular case, either 'which' or 'that' is grammatical.
In general, 'which' and 'that' are interchangeable when referring to something inanimate.
The main restriction is that that is not usually used to introduce a so-called "non-restrictive relative" (essentially, relative clauses where a pause is obligatory between the relative clause and the surrounding sentence).
However, in your case, the relative clause is of the "restrictive" type and speakers would use either 'that' or 'which' fairly interchangeably.
My answer comes so late that it is probably doomed to dwell at the bottom of the answer column, but the question remains a question about which I care, so my answer adds a point other answers have missed.
"Which" instead of "that" is almost always used in sentences with nonrestrictive qualification, as
The horse, which is in the paddock, is six years old.
The horse would still be six years old even if it were in the stable, see? Alternately and more to the point, there seems to be no second horse in view; there is no four-year-old horse about that might (which might?) also concern us.
As other answers have noted and as NOAD has advised, American English slightly, abstractly prefers the word which—as a conjunctive pronoun—to be reserved for this nonrestrictive use.
However, the best American writers have not uniformly followed NOAD's advice. Peggy Noonan does indeed follow it (with no recent exception I have observed):
My thought, which is really a question, is that candidates for president, while natural competitors, sometimes get to the point where they think they are going to win, and it messes with their heads.
John Steinbeck however does not:
The mattresses which had been on the floor were gone.
Even if you are of the rigid, conservative, antidemocratic school of proper usage, as I tend to be, it is hard to argue with Steinbeck. Nor is Steinbeck the only one.
NOAD's advice, quoted in another answer, is fine as far as it goes. NOAD is correct. NOAD should be heeded. However, there is more to the story than NOAD tells.
The trouble with the conjunctive pronoun that is that that is not just a conjunctive pronoun. It is a word with too many uses for its own good—too many uses, even in this very paragraph. The word that is a word which (a word that?) serves so many roles, in various parts of English speech, that the less frequent word which makes a welcome change. In the usage of which versus that, the euphonic has trumped the strictly logical.
Germanic languages are sometimes like that. Can't help it. It's in the bones of the language. English is not like Greek.
In short, heed NOAD's advice by default, but where which sounds better than that—as in complex sentences it often does, and even sometimes in simple sentences like Steinbeck's—even if you are American, feel free to switch to which.
You may often find cause to switch.
In British English usage the two are largely interchangeable, with the restrictive/non-restrictive distinction being indicated only by the presence or absence of a comma preceding the pronoun in question. This more often manifests itself as a restrictive "which" rather than a non-restrictive "that".
The only dissent that one may encounter in the UK tends to be a result of over-familiarity with the Americanish preferences of the Microsoft Word grammar checker, especially in earlier versions.
I have always learned - and therefore taught - that the choice to use "that" or "which" in a restrictive/identifying clause is purely based on register. "That" is used in an informal or spoken setting, whereas "which" is preferably used in more formal situations, for example in a formal report or essay.
"That" and "which" are therefore interchangeable in a restrictive clause, in my book.
Similarly, we can use "that" to refer to a person in informal, spoken register. Here below are examples which are all grammatically correct but go from least to most formal. The last two are probably outdated today.
The guy that I spoke to yesterday was French.
The guy who I spoke to yesterday was French.
The gentleman whom I spoke to yesterday was French.
The gentleman to whom I spoke yesterday was French.
As for usage in non-restrictive clauses, you can only use "which" with commas to mark the non-essential relative clause.
At times it seems rather confusing about the appropriate usage of which and that (both are used for groups and/or things and never for person*s*, at least i cant think of any such situation).
I have a simple rule to use them,
'That' implements a Restrictive/Essential clause and 'which' implements a Non-restrictive/Non-essential clause.
In your example, the 1st sentence gives an idea that the particular class of motorcycles are already identified, hence, which begins a non-essential clause.
The so-called American preference for banning "which" from restrictive relative clauses represents nothing more than the penetration of the educational system by Strunk and White's Elements of Style, which essentially invented the distinction where none could be demonstrated by even the most rudimentary statistical analysis.