Here's why:
* Adjectives modify nouns. "Sixteen" modifies the noun "years old" (implied), which is describing the age she was when she wrote the book.
* It's not a noun because it's not the subject of the sentence. The subject is "she".
* It's not a verb because it doesn't show action.
* It's not an adverb because it doesn't modify a verb, adjective, or another adverb.
Therefore, "sixteen" functions as an adjective in this sentence.