I agree with JoshuaZ that it is good to (1) see what they want recommendations for; (2) make clear to the student that you are willing to write a letter, but won't be able to say much besides how they performed in your class; and (3) make sure they still want a letter from you rather than someone else who may be able to write a stronger letter. (In many situations, they may not have better options for recommenders.)
I generally try to meet in person with students to discuss such requests, and at some point suggest they provide me with an (unofficial) transcript and some of their relevant application materials.
That said, here are some things to think about to help flesh out your letter:
Do you have evidence (from your gradebook etc) of them attending regularly, being punctual/responsible with assignments, showing good study habits or work hard, being motivated, performing consistently, or improving throughout the semester?
If you still have their final exam or some of their assignments, you can look though those again and try to find positive qualities.
From your interactions with them (even just interactions regarding the recommendation letter), does the student seem respectful, friendly, professional or organized?
Think about how the class they took from you compares with what they are applying for. Maybe you taught them something useful. Or maybe they were only mediocre in your class, but maybe comparing with the general population of people applying for said opportunity, getting a B in your class should put them in the 10% of that applicant pool. Many times, faculty have high academic standards and aren't aware how much stronger (in whatever sense) their average students are than the general population. (As a mathematician, I am often shocked about how mathematically weak many of the people who get hired into good data science jobs are.) Can you compare them favorably to people you know who succeeded in similar roles to what they are looking for?
If the student provides you with transcripts/application materials, you can try to use things you see in those to support any positive qualities you may have divined from the above (e.g., being motivated or focused).
Of course you shouldn't try to stretch the truth, and you may as well frame the letter by saying you just had the student in a large class without much personal interaction. Still, I find that usually one does not need to look too far to see evidence of positive qualities, and say whatever I feel I am able to truthfully and trust whoever is reading the letters to interpret them appropriately for their situation.