Q:

Are there rules about using "that" to join two clauses?

He will understand that I was not joking.

He will understand I was not joking.

Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?

A:

That can almost always be dropped. In your example, that is being used as a conjunction, i.e. it is introducing a subordinate clause as the object of the main sentence. In most situations where this is the case, it can be dropped. I cannot think of any where it can't be dropped.
When that is used as a demonstrative pronoun, e.g. "that was a nice question," it must be kept or replaced with another pronoun, e.g. "yours was a nice question."
When used as a relative pronoun, it can usually be dropped. For instance, "several people read the question that you wrote" can also be "several people read the question you wrote". But if used in a question with who, it should be kept. For example, "Who was the person that wrote this question?" cannot be *"Who was the person wrote this question?".
I'm sure I missed something, but the comments should keep me honest.

A:

For relative clauses: If the missing element (which is said to be "relativized") of the relative clause is the subject, "that" is obligatory, otherwise, it is optional:

Peter tasted the wine (that) his mother bought for him
Peter tasted the wine that/*() had cost only 12$.

A:

"That" is a conjunction in this type of sentence. (In "the cat that jumped over the wall", it is a relative pronoun.) It is in general OK to leave out the conjunction "that" now and then, as long as no ambiguity arises. Everybody does it all the time, even in formal style, though it happens more often in informal writing and speaking. It is possible too in German, though not in Dutch, as you probably know.

*She believed the judge, who was older
  than her father, was putting the moves
  on her.

In this sentence, the reader is led onto a false scent because "that" is omitted after "believed". This is a serious mistake. The reason why it is bad here is that "to believe" can have an object, so that the reader thinks "the judge" is simply the object of the verb, instead of the subject of a dependent clause, which in fact it is. When he finds out he is getting the sentence wrong, he needs to read back to repair the damage.

They say she was unable to realize her
  husband had left her.

This sentence is doubtful, because "that" is left out two times in a row. It makes the sentence a bit too loose, a bit messy: though the reader will probably get it right in one go, he will still need to spend a little more energy on it than necessary.

