Update: I had answered this question not knowing that the question had several assumptions behind it that were not made clear until comments were added to this answer.
The use of that is more acceptable in formal writing than informal writing.
Formality is better expressed with longer sentences.
I disagree with both of these assumptions. Formal writing can be precise and and follow a stricter set of adherence to grammar, while at the same time exercise style choices that aid comprehension. There is no context that can't benefit from the application of plain language.
If there is a situation where that hinders comprehension because it slows down the parsing of text, and where removing it doesn't damage the grammar, then it doesn't serve a purpose. The need for comprehension is even more important in formal text.
Omitting that is mostly one of style and, unless you're following a house style guide, it's quite subjective.
It really has little to do with it being informal or formal. Those who would argue against its overuse would want it removed from formal contexts too. In fact, people writing informally will seldom pay attention to the frequent use of that. It's actually more likely that those concerned with its overuse would removed it from formal writing than they would from informal writing.
I answered a similar question at English Language & Usage. Most of that answer is relevant, so I will quote it here:
Many people think that that should not be overused, and that sentences flow better without it.
From the blog post "Overuse of That" by Billie Jo Schinnerer:
My finding is many times it can be deleted without being missed and often increases the flow of the passage. For example in the sentence below:
She found that she did not like the soup.
She found she did not like the soup.
This is, of course, a subjective opinion. Some people may find the first sentence preferable, others the second. (I personally prefer the second sentence—without that.) . . .
But different sentences have different cadences, and sometimes it might sound more natural to include that in one and exclude it from another. The context in which a sentence exists (its surrounding text) also makes a difference.
There are some legitimate reasons why that should not be removed.
In the blog post "When to Delete 'That'," Neal Whitman (a guest blogger for Mignon Fogarty) gives the following example:
Sometimes, omitting a "that" after a non-bridge verb goes beyond being slightly awkward and can actually be confusing. Here’s an example from Bryan Garner’s Modern American Usage:
- Son acknowledges being a member of a minority ... may have helped him turn his eyes abroad early.
The trouble here is that "acknowledge" can be a transitive verb. So when a noun phrase comes after it, such as "being a member of a minority," the reader might just take it as a direct object: “Son acknowledges being a member of a minority.” But whoops! The sentence keeps going, and the reader has to go back and reparse it. Garner calls this a miscue; sentences that produce miscues like this are called garden-path sentences.
He goes on to say the following:
Nouns that sound awkward if you delete a "that" include "fact." A phrase like "the fact Squiggly likes chocolate" is clear enough, but it’s really awkward-sounding.
He finally concludes:
If you’re a native English speaker, the main rule to follow here is to go by your ear. You probably know what sounds natural and what doesn’t, and all you need to do is give that native-speaker intuition more weight and authority than a rule stating that you should omit "that" whenever possible.
If you’re not a native speaker, I recommend keeping the "that" unless you’re dealing with a verb, noun, or adjective that you know will sound good without it. It’s safer to leave it in than to leave it out. As you write and read more, you’ll identify more of the words that allow you to omit "that."