Change the voice: She wrote a letter.
Change the voice: She wrote a letter.
Explanation
The sentence "She wrote a letter" is in past simple tense.
The passive voice of a past simple sentence is formed as:
Object + was/were + past participle + by + subject
So, "A letter was written by her." is correct.