I'm upgrading a 2.1.3 site that had the Sidebar Widgets plugin installed, but not activated.
All widgets were deactivated during the series of upgrades (2.3, 2.6, 2.8, 3.0, 3.1).
In the 3.1 system, clicking on Appearance > Widgets gave a 500 Server error and a message in the browser that "You do not have sufficient permissions to access this page."
Deleting the plugin (using the he 3.1 plugin panel) resolved the issue.
[This may seem obvious, but I wasted half a day, so I'm documenting it here.]