On the whole it makes for smoothness of writing not to use the relative which where that would do as well, and not to use either if a sentence makes sense and runs pleasantly without. But that is a very broad general statement, subject to many exceptions.
That cannot be used in a "commenting" clause; the relative must be which. With a "defining" clause either which or that is permissible, but that is to be preferred. When in a "defining" clause the relative is in the objective case, it can often be left out altogether.Thus we have the three variants:
This case ought to go to the Home Office, which deals with police establishments. (Commenting relative clause.)
The Department that deals with police establishments is the Home Office. (Defining relative clause.)
This is the case you said we ought to send to the Home Office. (Defining relative clause in which the relative pronoun, if it were expressed, would be in the objective case.)