The correct answer is C. was.
The sentence is in the past tense, so we need to use a past tense verb. Of the four options, only was is a past tense verb.
Had been is the past perfect tense, which is used to talk about something that happened before another event in the past. In this sentence, there is no other event in the past that the cold weather happened before.
Has been is the present perfect tense, which is used to talk about something that started in the past and continues into the present. In this sentence, the cold weather was only happening last night, so it does not make sense to use the present perfect tense.
Used to be is the past simple tense, which is used to talk about something that happened regularly or repeatedly in the past but does not happen anymore. In this sentence, the cold weather was only happening last night, so it does not make sense to use the past simple tense.