Where does Skyrim store information about active mods and their order?
It's stored at %localappdata%\Skyrim\plugins.txt
(can be run from 'Start' » 'Search' or 'Run'), or C:\Users\[username]\AppData\Local\Skyrim\plugins.txt
. You can backup and restore that if you want.
IMO, it's better to just use LOOT to take care of the mods' load order. LOOT can automatically decide the optimal load order of mods. Also:
While sorting, LOOT checks for load order errors (such as incompatibilities and missing requirements) and notifies you of any issues that it detects. It also provides thousands of plugin-specific messages, such as usage notes and bug warnings, to help keep your game healthy.
I use Nexus Mod Manager and lately when I start the vanilla Skyrim launcher it messes up the order of my installed mods.
Just launch Skyrim or SKSE through the Nexus Mod Manager, to avoid the vanilla launcher messing up the load order of your installed mods.