As discussed in the comments of your question the general case of sorting a whole org-tree does not make sense.

But, you can sort the entries on the first level of a (sub-)tree with `org-sort` with respect to the scheduled time.

Place point on the tree heading and call <kbd>M-x</kbd> `org-sort` <kbd>RET</kbd>. Afterwards press <kbd>s</kbd> for the scheduled time.

This command changes the org buffer

<!-- language: lang-org -->

    * Sorting
    ** TODO do something
       SCHEDULED: <2018-01-29 Mon 22:00>
    ** TODO do the second thing
       SCHEDULED: <2018-01-29 Mon 10:00>
    ** TODO do the first thing
       SCHEDULED: <2018-01-29 Mon 08:00>

into:

<!-- language: lang-org -->

    * Sorting
    ** TODO do the first thing
       SCHEDULED: <2018-01-29 Mon 08:00>
    ** TODO do the second thing
       SCHEDULED: <2018-01-29 Mon 10:00>
    ** TODO do something
       SCHEDULED: <2018-01-29 Mon 22:00>

If you prefer menu handling you can call `org-sort` with `Org->Edit Structure->Sort region/children`.