The correct option is B had been raining
Here, 'had been raining' in Past Perfect Continuous Tense is correct because it
is used to indicate an action in the past that began before a certain point in
the past and continued up untill that time.
'Was raining' in past continuous is incorrect because it
is used to indicate uncompleted action in the past (with or without time
reference).
'Is raining' in present continuous is incorrect it
implies an action going on at the time of speaking.
'Rains' in present simple is incorrect because it
is used to indicate a future event on a designated date as part of a plan.