Venus has the most intense tilt in the solar system. Venus is actually upside-down, compared to the other planets. The thinking is that Venus got flipped the same way the Earth got its tilt. In the young solar system, when there were lots of little planets wandering around, collisions were common. It was one of these collisions with a Mars-sized planet that gave the Earth its tilt. The debris from that collision created our moon. Venus probably got its extreme tilt from one or many of these collisions.
For the inner rocky words of our solar system, this collision model makes sense; the outer planets are another story. The outer planets are made mostly of gases like hydrogen, helium, and methane. Uranus's axis is tilted over 90 degrees. Yes, Uranus orbits the sun on its side! Even most of Uranus's moon's are orbiting in this weird plane. The problem: to tilt such a large planet, you need a lot of big planets to hit it. We just don't think that there were that many big planets hitting Uranus. Some other ideas are out there, but it is really hard to know what happened 4.5 billion years ago. Hopefully one day we will find new evidence that could lead to an answer, but for now this is another one of our solar systems mysterious features.