If you are installing via the Server Manager GUI ("Add Features"), order of installation does not matter. The Add Features wizard checks all dependencies and will alert you if you are missing any required modules. In addition, Add Features wizard knows the correct ordering of modules.
If you are installing from a command line or using an unattended installation, the order of modules doesn't matter (again, Setup knows the correct ordering of modules), but you are responsible for identifying all dependencies. If you fail to include a required dependency, unattended/ command-line setup will fail.
Note
As opposed to the order of modules during setup, the order in which modules are arranged in the common pipeline (i.e., the order in which modules subscribe to notifications) is important. For example, if two modules subscribe to the same notification, the one first on the list gets notified first (With one exception-- the default IIS 7.0 modules should not have issues with reordering). For the authentication modules, it is advisable to keep the existing ordering because this will determine with which authentication scheme IIS challenges first. We order it from most secure to less secure. IE uses the first authentication scheme it understands and if you put a less secure authentication scheme first, IE chooses it instead of the more secure one.