Not a teacher
In my opinion question tags ask for confirmation of what the speaker was led to assume
Last night, was it? The speaker has motives to assume "it was last night" and asks for confirmation.
"Was it last night?" The speaker is not assuming.
- For Teachers