I wonder if a first year graduate student can write recommendation letters to high school graduates applying to US colleges.
I can’t say much about the extent to which such a letter would be helpful to someone’s application, but a letter from a graduate student, assuming it is truthful and written in good faith, is absolutely acceptable. I can imagine situations where it would be pretty helpful actually, others (like your particular situation where you know very little about the applicant’s actual abilities) where it wouldn’t be.
he wants me to recommend his friend who is also applying to US colleges, although I have never met or spoken with his friend at all. He wrote himself a recommendation (which I have to send as if it's me who had written it) that he had worked with me in the physics laboratory and that he was my strongest student. I wish to know how to proceed.
First and most importantly: Do not under any circumstances send a letter of recommendation containing untruthful statements. If you send it you would be committing serious academic misconduct. It is unethical and if the lie were found out you could get in serious trouble.
Second, this request reflects quite poorly on your family member/connection. I suggest explaining to him in no uncertain terms that his request is unacceptable and unethical, and that he should not be abetting his “friend” in cheating his way into college. Don’t “decline politely” as some people are suggesting in the comments. I assume if someone were to ask you to rob a bank as a favor you wouldn’t be “declining politely”. This young man is at a point in his life where a tough bit of reality can be immensely helpful in helping him mature and learn how the world works. If you care about him, you’d do well to tell him the truth about the nature of his request even if it’s unpleasant.
As for writing a letter where you say you don’t know the friend of your family connection, presumably that would itself be a dishonest act since you would be telling the friend that you’d be sending the fraudulent letter that he wrote, but actually sending a different letter. You would be leading him into trouble, and while arguably he deserves it, it’s more ethical and decent to try to prevent him from getting into trouble in the first place by steering him towards a better path.
Edit addressing some of the comments: when I said not to decline politely, my issue is not so much with the “politely” but rather with the neutrality implied by “decline”. So for example, OP should not say
Please tell your friend that I don’t feel I can help with his request. Sorry! And best regards to Aunt Betsy.
This doesn’t send any helpful message about how serious and unacceptable it is to take part in a conspiracy to send fraudulent letters of recommendation. Instead, what I meant was that the reply should be clear and direct about this issue (whether it’s polite or not is beside the point, OP can use whatever mode of address feels natural to them when talking to this person). For example, something along these lines would be much more helpful:
Hi [name],
I can’t help your friend by sending the letter he wrote, and you should know that what he is asking is completely unacceptable and is a form of cheating. I would never lie in a letter of recommendation, your friend shouldn’t ask anyone to do such a thing and you shouldn’t help him if that’s what he insists on doing. It can get him into serious trouble, like being expelled from college or not getting in in the first place.
Anyway, I understand you’re just getting started with the whole college application thing, so maybe you didn’t know. That’s okay I guess, but I wanted you to understand how serious this is. College isn’t high school, and cheating is taken extremely seriously there. If you need more advice about how to handle any of the application business, I’d be happy to discuss it, so feel free to reach out.
Give my regards to Aunt Betsy!