The correct option is D ought to
Option B: The modal verb 'ought to' refers to a duty or correctness, usually when criticizing someone's actions. It agrees to the given sentence in meaning. The speaker criticizes 'you' for not having written to 'him'. Hence option B is correct.
Option A: 'Need' refers to a necessity. The meaning doesn't agree here.
Option C: 'Dare' refers to an action that someone is 'bold enough to do'. The sentence does not present any action that sounds bold.
Option D: 'Will' refers to a future tense, whereas the action here is in relation to the past.
Hence options A, C and D are incorrect.
(Note: As a semi-modal verb, 'ought' is always written with 'to'. The other semi-modals too, 'need to', 'dare to', used to', appear in the same form. But these verbs 'need, dare, used' are applied without 'to', when not functioning as modal verbs.)