There's a new Twitter feed called thatwhichmatter, whose goal is "To honor the that/which distinction, and all grammar that which matters."
The that/which distinction, as given by usage writers like Strunk & White and Fowler, goes like this:
"Use that to introduce restrictive relative clauses, and use which to introduce nonrestrictive relative clauses."
A restrictive relative clause is one that adds essential information, as in this example from The Elements of Style:
1) The lawn mower that is broken is in the garage.
There is more than one lawn mower; the relative clause that is broken is essential because it tells us which one.
A nonrestrictive clause is one that adds nonessential information:
2) The lawn mower, which is broken, is in the garage.
There is only one lawn mower, and the clause which is broken adds additional but nonessential information.
Strunk and White go so far as to advocate "which-hunting", and replacing all restrictive whiches with thats:
Careful writers, watchful for small conveniences, go which-hunting, remove the defining [restrictive] whiches, and by so doing improve their work.
The problem is that altho careful writers might do that, good writers don't. Even E. B. White himself didn't:
...the premature expiration of a pig is, I soon discovered, a departure which the community marks solemnly on its calendar - E. B. White, "Death of a Pig"
The reality is that which introduces restrictive relative clauses and has been introducing restrictive relative clauses for as long as it's been a relative pronoun (the 14th century). It isn't which that signals a nonrestrictive relative clause, it's the commas.
Here are a few more examples of which introducing restrictive relative clauses, from good writers who knew what they were doing:
It was a concern which brought just employment enough. (Jane Austen, Emma, chapter 2)
However, she soon made out that she was in the pool of tears which she had wept when she was nine feet high. (Lewis Carroll, Alice's Adventures in Wonderland, chapter 2)
He lived in chambers which had once belonged to his deceased partner. (Charles Dickens, A Christmas Carol, Stave 1)
Buda-Pesth seems a wonderful place, from the glimpse which I got of it from the train and the little I could walk through the streets. (Bram Stoker, Dracula, chapter 1)
I think I can see a little into the springs and motives which being cunningly presented to me under various disguises (Herman Melville, Moby Dick, chapter 1)
...and Mrs. Heathcliff leaning over the fire, diverting herself with burning a bundle of matches which had fallen from the chimney-piece as she restored the tea-canister to its place (Emily Bronte, Wuthering Heights, chapter 2)
Given the choice between writing like Strunk and White's imaginary careful writer and good writers like Carroll and Austen, I know who I'd choose.
Trying to follow Strunk and White's that/which distinction can cause all kinds of unintended consequences, as explained by Zwicky on the Log.
So to quote Merriam-Webster's Dictionary of English Usage:
You can use either which or that to introduce a restrictive clause - the grounds for your choice should be stylistic - and which to introduce a nonrestrictive clause.