What makes the difference between "summa cum laude" and "magna cum laude"? The evaluation of PhD candidate is done based on his/her thesis, his defence presentation and the oral examination (in some countries). If the examiners do not find so much to argue about, the candidate gets "magna cum laude". In some cases, he may get "summa cum laude". 

By attending some PhD examinations and reading the theses, I could not find the key factor, which distinguishes between these two academic honours. The publication list was not a criterion as well. Note that I am talking about examinations in the same faculty of the same university. 

Since there is no concrete evaluation of the PhD examination, how examiners decide to give "summa cum laude" instead of "magna cum laude"? In other words, what can the candidate do to make this difference?
There is - to my knowledge - no universal guideline. But basically "magna cum laude" is the go to grade for good students, so hopefully the one most students of an institution receive. 
To get a "summa cum lauda" a student needs to really show outstanding promising work, winning awards for papers can be an indicator, but is neither a necessary nor a sufficient criteria. Basically the supervisors need to believe they see a future professor/inventor/researcher in the making who has the potential to shape the research in some area.

On the other hand (where available), if the candidate does okay, but with some let-downs, there is often also the "cum laude" option. 

Note that this also can vary by country and institution. See https://en.wikipedia.org/wiki/Doctorate or (German but way more on grades, checkout the "Bewertung" section) https://de.wikipedia.org/wiki/Promotion_(Doktor) for a list of varying grades (again, there seems to be additional institution/area variation in addition to the country defaults).