A person who writes a will is commonly referred to as the "testator."
A person who writes laws is called a legislator or a lawmaker.
A composer is a person who writes music.
The person who writes a check is called the payor. Or in the case of my brother, a sucker, when he writes another check for his girlfriend.
A Philosopher
An autobiographer is a person who writes the story of his or her own life.
A person who studies or writes history is called a historian.
A person who writes plays is known as a playwright. An example of a playwright is William Shakespeare.
A person who writes the libretto for an opera is simply referred to as the librettist.
testator
biography.
An author.