This plugin lets you sort layers by their content.

Sort Layers

Sorts the selected layers or artboards. Note: This plugin will also reorder the layers in the layer list to match the visual order. For best results, group your layers before sorting.

There are also plugins to reverse the order of the layers in the layer list and a plugin that reverses the position of the selected layers on the artboard.

Options: Text (A->Z), Text (Z->A), Layer Name (A->Z), Layer Name (Z->A), Top, Left, Random

Shortcut: ctrl + + + S

Sorting Layers by text, visually

Selection Animation

Sorting Layers in the layer list by position

Selection Animation

Reverse Layer Order

This will reverse the layer order.

Reverse Positions

This will reverse the position of the layers on the canvas.