You can separate a reference letter into three sections.
In the first, you describe your relationship to the student and in what capacity you know him: modules X, Y, Z, dissertation supervisor, personal tutor etc. Add some standard introductory phrases and you should have a paragraph.
In the second section your refer to hard evidence: details of the student's performance in your courses, coursework/ dissertation topics, grades, performance in percentiles (top 10 - 5 - 2%), where the student has been particularly strong or the topics that interested him and, depending on the type of the relationship, you provide details on the dissertation (supervisor) or the student's engagement (personal tutor). I focus on the qualities that are not apparent from the student's transcripts, e.g. if a particular methodology has been used skillfully in research, if the student participated in societies or university events, organised something, led a group etc. Also, look at the course outline to hughlight performance in relevant areas. This can be important for a student that did exceptionally well in closely related modules but the average or performance in unrelated classes is not that impressive.
In the third section you refer to personal qualities related to academic performance: focus, commitment, initiative, interest, engagement, individual worker/ team player, easy to work with or not, independence, self-motivation, intelligence, academic skill, discipline, stability and continuity in performance, mental fortitude, resilience. You do not have to say if the student is funny, pleasant, introvert/ extrovert, well-mannered, social, with a good taste in wine etc. You should refer, however, to how student dealt with difficulties (very relevant for a personal tutor) or, if you are aware, if the student's performance was affected by certain factors or if there were were any special circumstances. Say nothing you do not feel comfortable with, and if you are not sure what to disclose ask HR or admin. Try to think what you would be interested to read in a reference letter, what would help you decide and what would make you decide. In that way, the colleague reading the letter is more likely to have a clearer idea of the candidate. Do not exaggerate, do not try to make the student look better than he/she is and try to provide examples. In a nutshell, would you suggest that person working with someone or attending further education, and why?
In the conclusion, you can provide a bref overview of your opinion, why the student is particularly suitable for the programme and whether you recommend him. Some people add a phrase such as "I recommend X to all but the highest-ranking institutions" to show objectivity. I prefer showing that in different ways, especially if the student is indeed applying to a top university.