Recently upgraded my Macmini, Macbook White and Macbook Pro to OS X Lion and after fixing some installation issues caused by hard drive faults, the upgrade went without problems (ignoring the horrendous download experience).
The Macmini worked perfectly, however the Macbook and Macbook Pro both had a strange fault, they would startup just fine, except that just after the desktop was displayed, both machines would shutdown.
Strange, safe booting into the OS and then restarting would allow me to boot back in correctly.
After much googling and not finding a resolution, I noticed upon startup the Macbook Pro got to the desktop then showed a dialog box asking where the Finder app was located, and the active application (as shown in the task bar) was Shutdown.app, clicking cancel dismissed the dialog and the MBP shutdown.
However there was the clue, on both the MB and MBP I use some apps called Dockables, which provides app shortcuts to common actions (Shutdown, restart, Sleep etc).
I figured that when running the Shutdown app to shutdown, Lion was reloading it on startup due to the new OS X Lion Resume feature, shutting down via the task bar menu proved this to be the case.
A solution to this I suppose is to disable Resume, or disable it for a single app (a handy app called Lion Tweaksallows you to do this), however I removed Dockables and shutdown/sleep using the menu or keyboard shortcuts.