Difference between 'which' and 'that' in restrictive (defining) relative clauses
As Janus Bahs Jacquet states in the comments, the difference is essentially one of formality. The Cambridge Grammar of English states the following general principle:
In a wide range of informal styles, that is used instead of who/whom or which in defining relative clauses. (p571)
This principle is confirmed by Swan in Practical English Usage:
We often use that instead of who or which, especially in an informal style. (p478)
Swan goes on to note:
That is especially common after quantifiers like all, every(thing), something, any(thing), nothing, little, few, much, only, and after superlatives. (p478)
When the relative reference is to a person, Swan states:
That is often used in identifying relative clauses instead of who/whom/which. That is most common as an object or as a subject instead of which. That can be used as a subject instead of who, but this is quite informal. (p482)
The Cambridge Grammar of English notes (of defining/identifying relative clauses):
That may refer to the complement of a preposition, but not when the preposition is placed immediately before the relative pronoun:
- The other girl that I told you about also lives in Bristol.
So, the following is not grammatical:
The other girl about that I told you also lives in Bristol.
It must be: ... about whom ... . Of course, this very formal usage conforms to the general principle noted above.
It sounds like you might have a copy of the 2002 reference grammar by Huddleston and Pullum et al., The Cambridge Grammar of the English Language. If so, then there's probably a section in there that addresses your question.
In my copy (printed in 2008, with corrections), there's within Chapter 12 the section 3.5.4 "The choice between the wh and non-wh constructions", pages 1052-4. It contains stuff like:
(d) That which and all who: obligatory wh -- which has the example "That which we so carefully created he has wantonly destroyed".
(e) Anything, all, etc.: non-wh preferred -- which has the examples "Anything (that) you say may be used in evidence against you", "All (that) I ask for is a little peace and quiet".
(f) Nominals with superlative modifiers: non-wh preferred -- which has the examples "She gave me the best meal (that) I'd had for many years", "You should take the first appointment that is available", "That fish is the biggest (that) I've ever seen".
(g) Relativised element is ascriptive predicative complement: normally non-wh -- which has the examples "He's no longer the trustworthy friend (that) he was in those days", "The interview turned out not to be the ordeal (that) I had thought it would be".
There's more info in CGEL that might interest you.