All you have to do when it comes to decide "that" yes or no is to know the subject and the object of a sentence.
You must use that when it refers to the subject of a sentence.
Where are the eggs that were in the basket?
Eggs is the subject. You cannot say:
Where are the eggs were in the basket? ---> wrong
You can leave out that when it refers to the object of a sentence.
The car (that) I wanted to buy was red.
In this example you can use that but it is not necessary.
"I" is the subject and "car" is the object.
Hope that helps,
- For Teachers