What makes the difference between "summa cum laude" and "magna cum laude"?
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).