You put your own reputation on the line when you write a letter of recommendation. If you feel you do not know the person well enough, or they are somebody you cannot in good conscience recommend, decline their request.
Get feedback. If you’re not sure of your letter-writing skills, or if your letter will carry a great deal of weight for the candidate’s application, ask for feedback from a trusted colleague who may also know the candidate. If you are putting your reputation on the line for this person, you want to put your best foot forward with this letter.