The answer is B. for many decades.
That's because this phrase is explaining for how long something has been done and a time reference stands for an adverb of time. Thus, this clause is an adverbial (time) clause.:
The adverb phrase in the sentence 'That old lighthouse has warned sailors for many decades' is 'for many decades,' as it describes the duration of the action. The other options do not function as adverb phrases. Understanding adverb phrases enhances clarity in expressing actions and their contexts.
;