What is the difference between "I will have written the letter tomorrow" and "I will write the letter tomorrow"?
To say I will write the letter tomorrow is a plain statement of intent in which you look forward at the present moment to an act you plan to carry out in the future.
To say I will have written the letter tomorrow is a way of looking back from a future point at an intended action that lies between the present and that future point.
We use this construction particularly for reassurance, whether to ourselves or a third party.
For example, a soldier might reflect: At this time tomorrow I will have completed my tour of duty.
And a builder might reassure an anxious householder: The house repairs will have been completed by tomorrow evening.
So the difference lies not in the future action itself but in the way that the speaker regards it - and the speaker's purpose.
Which construction you would prefer really depends on the context.