It is important to inform a candidate that he or she has not been selected for the job, at the same time it is difficult to write or decide what to write in a letter of rejection. It is also not a good idea indeed to straight away inform the recipient that he or she has been rejected. A letter of rejection should be an announcement by the company or organization and it should be written on the letterhead of the company or organization. You should address the person by name, to make it specifically a personal letter. You should write a short letter, try to avoid any kind of details and keep the letter to the point.
Letter of rejection is never good news for the recipient so keep it direct yet sympathetic; your letter should sound decisive. You should compliment the recipient, and it should be a genuine compliment. You should briefly tell the reader about the process of decision making, like how many applications were received and what was the criteria of selecting a right candidate. You should encourage the candidate for some more opportunities in other organizations and be genuine while suggesting this.
You can also suggest the candidate some areas he or she needs to improve. Over all expression of your letter should be balanced. Use appropriate words to announce the rejection news and stay polite. Your letter of rejection should not only convey your decision of rejection but should also console the reader. A well drafted letter of rejection is the one that boosts the spirits as well. Do mention that probably this was not a right place for the candidate. Read your letter before sending it, it should be clear from any kind of ambiguity, spelling and grammar mistakes. Your letter should clearly convey the reason of writing the letter that is the subject of letter.