Respond to the person in the same manner that they inquired about the letter of recommendation. If the person emailed you, respond with an email. There's no need to write a formal letter rejecting the request, as this only makes the person feel worse about the rejection.
Tell the person directly that you cannot write a recommendation. If you don't remember him or know him well, point out that he could get a much better, thorough recommendation from someone else. If the denial is based on lack of skill or qualification, take a similar tack. Strongly suggest he seek a recommendation elsewhere, and reveal your frank reservations if necessary.
Keep the denial response short and get right to the point. Elaborating on the decision draws out a sometimes embarrassing rejection process and makes it more uncomfortable.
Thank the applicant for thinking of you, and wish her the best of luck with future endeavors. Strike a sincere, warm tone.