There are 3 possible ways to enable/disable the auto-rotate function in Windows 8.
For tablets with a keyboard connected, press the key-combination Windows ( key + O to toggle the auto-rotate function.
Right-click the desktop and select 'Screen Resolution'. Check or uncheck the 'Allow screen to auto-rotate' box below the resolution settings.
Press the Windows key + C, or swipe in from the right edge of the screen to open your Charms. Tap 'Settings' and tap 'Screen' in the bottom of the bar. Tap the little square icon above the brightness-slider to enable/disable auto-rotate.