Why is Uranus on its side?
Short answer: When it was a young planet, one or more huge collisions with others celestial objects tipped Uranus on its side.
Long answer: All the planets in our Solar System are tilted at least a little bit. While each planet rotates on its own axis, most are more or less the "right way up", i.e. they rotate with their north pole facing in the same direction that we call north on Earth. Earth is tilted 23.5°, Mars is tilted 25.19° and most other planets vary between 0.03° (Mercury) and 26.73° (Saturn).
Uranus is different. It is flipped 82.23°, making it pretty much flipped on its side. If you can imagine all the planets orbiting the Sun in more or less the same plane, most other planets spin around like spinning tops as they orbit. Uranus is more like a corkscrew. This diagram shows how Uranus is orientated as it orbits:

Image credit: NASA, ESA, and A. Feild (STScI)
Something must have happened to Uranus to push it over on its side. Whatever it was, it happened a very long time ago. Astronomers believe that in the early days of the Solar System when it was a much busier place with frequent major collisions, Uranus was hit by at least one very large object. Initially it was thought that one big collision would have been enough to tip Uranus on its side but recent calculations have shown that this would cause the planet to be completely upside down. It's more likely that a series of collisions are responsible.
See also: