We use it when talking about the weather, time, measures and distance: It is very cold tonight.
It functions as an anticipatory subject for:
We use there plus a form of to be when in Norwegian we want to say that something exists or is. If we can replace ’det er/det var’ with ’det finnes/fantes’, we must use there is/was in English.