I won't write poor letters of recommendation. I rarely have
to refuse a student by telling him so. My most usual response
to a request from a less than stellar student is "Doesn't
some other faculty member know you better than I do?" Unless
he is really quite dense he understands.
I do write letters for many students (I've been teaching the
premed course), even when I don't know them well. I simply do
as I've done for a student whose letter is in my "to do" pile
now; I invite him for an interview. He got one of the four A+
grades I gave in a class of more than 200, but I'd not spoken
to him before he asked me for a letter. The interview is very
helpful even if I do know the student casually.