I did a LOR for a medical student while I was Chief Resident. I ran the IM service and the student was my right hand for that month. He was exemplary - not sure how I would have gotten everything done without him. He is the only student I have done a letter for - it was received just fine and he got into his choice residency. He didn't spend enough time with the attending to get a decent letter from him. I agree, don't just ask any resident for a letter, it won't carry any weight.