All Grasshopper data is stored in lists. Sometimes this data is stored in a predictable (sorted) fashion, sometimes it is chaotic (unsorted). The Sort component allows you to sort up to 4 sets of data simultaneously, though this example only sorts 2 sets at the same time.Points by themselves cannot be sorted, but numbers can.
This example sorts an unorganised set of points by creating a new list of distance values which acts as the key list. As the key list is sorted, the points are automatically shuffled in the same fashion.