In sentence 1, that acts as a relativizer (relative pronoun). It may be dropped (in any register) because it acts as the direct object of the verb in the relative clause. It could not be dropped in formal English (though it often is in informal spoken English) if it were the subject of the verb in the relative clause:
✲ It's the same girl Ø took our family photo.
In the remaining sentences, that acts as a subordinator (subordinating conjunction). In sentences 2, 3 and 4, that may be dropped because the subordinate clause which it heads is the direct object of the verb in the main clause and is in its ordinary position immediately after that verb.
If that played another role, such as subject, or if the subordinate clause were displaced to another position, that could not be dropped, because it would not be clear that it is in fact a subordinate clause:
✲ Ø he's protected by his family is understood by Alex ... The clause falls at the beginning of the sentence, before the verb is, because it has become the subject. That cannot be dropped.
✲ I came to know some eight or ten days after I got the report Ø you got stuck in traffic. ... Here the subordinate clause has been separated from its governing verb by a fairly long ('heavy') adverbial phrase . You could probably get away with dropping the that in speech, but it cannot be dropped in formal writing.
In sentence 5, and in these rewrites of sentences 4 and 5, the situation is a little different: These subordinate clauses are predicative complements of BE, and in speech that may be dropped even if the clause is moved to the front. In writing it's permitted, but not advisable; you really want to give the reader as many clues to your structure as possible:
? What many people are saying is Ø they saw a ghost.
? Ø I need help from you is the reason I'm helping you.
In other uses, as a demonstrative adjective or a demonstrative pronoun, that may not be dropped.
I want that puppy. but not ✲ I want puppy.
John took that from Shakespeare. but not ✲ John took from Shakespeare.
✲ marks an utterance as unacceptable
? marks an utterance as possibly unacceptable
Ø marks the place where that is omitted
Best Answer
The three sentences do not have the exact same meaning.
First of all, your last sentence uses pleasantly, a word much weaker than fun in that meaning. If you want to work pleasantly, the work must not be tedious, boring, but must be likable. Saying you want to work having fun is much stronger. You really want to enjoy the act of working and have the work make you happy.
So the third sentence is definitely different from the first two. Now what about the first vs. the second sentence? I think there's just a slight difference in focus/stress. In the first sentence, the focus is on having fun and not on the work. The phrase about having fun is the main part, while work modifies that phrase and gives additional information. Compare that to the second sentence, where your focus is on work and having fun is a postmodifier providing additional information.
Of course that difference is only very small and I think in most contexts, the first two sentences can be used interchangeably.