Which way did you set your side switch in Settings - General - Use Side Switch to? If you chose Lock Rotation, then perhaps your side switch is set to lock screen rotation and you have change it's position.
Another way to solve this:
Double press the Home button, then slide to the right, to reveal this:
If there's a padlock in the left icon at the bottom, tap it once to unlock rotation.