Darcy is astonished by Elizabeth's rejection, having convinced himself that she would welcome his proposal. Not only does she refuse, but she insists that she is offended by his manner of proposal and by his behavior towards people of his acquaintance. Elizabeth cites two specific grievances. The first is Darcy's interference in Jane and Bingley's relationship. The second is the interaction between Darcy and Wickham. Darcy feels he needs to defend himself, particularly in regards to Wickham. Part of his desire to defend himself must be to ensure that Elizabeth, whom he really does love, doesn't get taken in by the lies of Mr. Wickham. Regardless, Darcy feels very strongly that he must defend himself against charges that are without truth.
This particular letter has a dramatic meaning. Austen has Darcy defend himself by way of a letter because a letter cannot change. This is very important to the storyline. Elizabeth is unable to forget the wording he used, or alter the way in which she remembers his defense.
The letter is also helpful in that it allows Darcy to relate the whole story without interruption and in a way that none of what he says will get lost.