Theory:
A normal sentence has a subject and a verb, which are the most important words in a sentence, and so come at the front.
The dog is in the garden.
THE DOG is the subject, and IS is the verb.
Under some conditions, it is convenient to replace the main subject by a false subject:
The dog is in the garden.
There is a dog in the garden.
here THERE is acting as a false subject.
Often the pronoun IT is used for this function:
Today is Sunday. (Today is the subject)
IT is Sunday today. (IT is a false subject)