I have to admit that I always found Sonya to be a character of convenience for Tolstoy in this novel. She seems to exist not as a real person, but as a foil for the Rostov’s.
However, the turn where she writes the letter to Nikolai because she believes that setting him free will bring him closer to her is her best moment as a character. Tolstoy was probably proud for having thought of it, too.