Is it safe for an 18 year old to donate a kidney?

Maybe. It is a safe operation but the real question is should it be done. An 18 year old has a long life in front of them and if it is a family member that is getting the kidney, how can one be sure that the problems that cursed their kidney failure won't affect the donor's kidney decades in the future. Many centers around the country won't accept teenage donors due to ethical concerns.
Yes. As long as there is a good reason to donate (family member, spouse) and there is no underlying history or family history of potential kidney disease (i.e. Diabetes, etc) there is no contraindication, unless voiced by the individual nephrologist or transplant surgeon.