I am writing to you (formal)
I am writing to you to apply for the position.
I am writing to you to explain a problem.