Answer:
Either can be correct depending on the context and the tense.
I will write you means the same thing as
I will write to you.
The "to" is understood even if not present, for example:
I write to you whenever I am lonely.
I write you whenever I am lonely.
The form without the "to" is used when "you" precedes the direct object.
I will write you a letter.
I will write a letter to you.