How do you write a letter of recommendation for someone who got an A in your class, but who you've never talked to outside of class? I taught a large class last summer, and one of my students asked me to write a letter of recommendation.  I said yes, and at this point I think it is too late in the application process to change my mind.

The student got an A in the class, but never came to my office hours or talked to me at all before she asked me for a letter of recommendation.  She also hasn't done anything specific to distinguish herself.  At this point I'm really not sure what to write about her, although she did give me a "brag sheet" with information about her interests and previous projects.

How should I go about writing the letter?
Here's my understanding of the issue: A student, who you do not know very well outside of the classroom, asked you for a recommendation letter, and you said "yes."

So, assuming you thought highly of the student's performance in your course, you write the strongest letter you can under these circumstances. 

This means you focus on the student's performance in your course, and compare the student's performance to the performance of others who have taken the course. If your course is particularly challenging in some way, you may also extrapolate on how the student's performance is indicative of some key strengths which are relevant to the student's target grad programs. 

There is no need to overthink this, and if the student is not successful in getting into a good grad program, and they think it is because you weren't able to vouch for them the way that they would prefer, then, if they're a fast learner, they'll ask someone else next time.