the refers to something that is either explicitly or implicitly defined outside the context of the current sentence, or within a sub-clause of it.
When we use there is/are in the sense you are using it, we are generally explaining that something indefinite exists or is available:
There is ice in the freezer
If you want to talk about some particular ice, whether explicitly or implicitly defined, we say
The ice is in the freezer
If you are introducing a reference to some dogs that you can see, you don't use the, because the dogs are defined within the sentence, rather than outside. You say
I can see some dogs.
If the dogs that you can see are in the garden, you can say:
I can see some dogs. The dogs are in the garden.
This is a legitimate use of the, because the dogs you are referring to are explicitly defined in the previous sentence (outside the current sentence).
The dogs [that I can see] are in the garden.
This is also a legitimate use of the, because the dogs you are referring to are explicitly defined in a sub-clause of the sentence [that I can see].
The dogs could be defined implicitly too. For example, if you are talking to somebody who knows that you have several dogs, you could say:
The dogs destroyed some cushions yesterday.
The listener will understand the implicit reference to your dogs.
If you start trying to use
the as a reference to something that is implicitly defined by the sentence itself, you get a circular reference.
There are [the] dogs [that are in the garden] in the garden.
Looking at your first sentence,
We took photos of the red squirrels [that are in St James's Park]
the red squirrels are explicitly defined in a sub-clause of the sentence - "that are in St James's park".