Let's analyze each pair of sentences:
A1. This is something 3-year-old me would have liked.
A2. This is something the 3-year-old me would have liked.
Both sentences are grammatically correct, but A2 is more precise. Using "the" emphasizes a specific version of yourself at age three. However, in casual conversation, A1 is commonly used and understood.
B1. She doesn't particularly like sweets. But her sister, the three-year-old Amanda, enjoyed them very much.
B2. She doesn't particularly like sweets. But her sister, three-year-old Amanda, enjoyed them very much.
In B1, "the" is used because "three-year-old Amanda" serves as a descriptive apposition, providing essential information about "her sister." In B2, without "the," "three-year-old" functions as an adjective directly modifying "Amanda." Both are correct, but B1 is slightly more formal.
C1. The book was written by popular writer C.S. Lewis.
C2. The book was written by the popular writer C.S. Lewis.
C2 is more natural because "the" specifies that C.S. Lewis is a particular popular writer known to the reader. Without "the," as in C1, the sentence is still correct but less specific.
In summary, the use of "the" adds specificity and formality, indicating that the noun it precedes is known or has been previously mentioned. Its inclusion or omission can subtly change the emphasis or formality of a sentence.