I suspect that due to the random collision of gas clouds, or similar processes involved in the formation of solar systems, the rotation angle of a solar system - and of the star in the middle - is quite random.
Uranus.
Mercury and Pluto.
The planet Uranus is tilted "on its side" about 98 degrees to the orbital plane. But all planets in our solar system have some tilt to the side, including Earth which tiles about 23 degrees. (Mercury's tilt is very small.)
The Sun _does not_ tilt. The Earth orbits around the Sun, and the plane of the Earth's orbit around the Sun is called the "ecliptic". Compared to the ecliptic, the axis of the Earth's spin is "tilted" at a little over 23 degrees. It is this "tilt" of the Earth's spin that causes the seasons. So, WHY is the Earth's spin axis "tilted"? We may never know for sure, but at least some scientists believe that it may be related to the planetary collision that created the Moon.
It's because the Earth's axis is tilted. Therefore the plane of the equator is tilted (at about 23.5 degrees) away from the plane of the Earth's orbit. Therefore the celestial equator is tilted away from the ecliptic.
Earth is tilted at 23.5 degrees from the plane of its orbit around the Sun.
Uranus.
Mercury and Pluto.
The Earth's axis is tilted at an angle of approximately 23.5 degrees from the line perpendicular to the Earth's plane of orbit around the Sun. This tilt is the reason for the changing seasons on Earth as different regions receive varying amounts of sunlight throughout the year.
Neither; the ecliptic, the plane of the Earth's orbit around the Sun, is inclined to the galactic plane by about 60 degrees. The galactic plane is easy to see; it is the path of the Milky Way across the night sky.
It's because the Earth's axis is tilted. Therefore the plane of the equator is tilted (at about 23.5 degrees) away from the plane of the Earth's orbit. Therefore the celestial equator is tilted away from the ecliptic.
This must be Uranus. "On its side" isn't a very scientific way of putting it. It means that the planet's axis is tilted at about 90 degrees (98 degrees actually) from the perpendicular to its orbital plane.
The planet Uranus is tilted "on its side" about 98 degrees to the orbital plane. But all planets in our solar system have some tilt to the side, including Earth which tiles about 23 degrees. (Mercury's tilt is very small.)
The Earth's axis of rotation is at an angle of 23.5 degrees to the plane of the "ecliptic", the orbital plane of the Earth around the Sun. In space, there is no "up" or "down"; for something to be "tilted", it has to be tilted with reference to something else. Since we're here on Earth, it makes sense to use the ecliptic as a common reference plane.
23.5 degrees. That's the angle between the axis of the Earth and a line that is perpendicular to the plane of Earth's orbit around the Sun.
The ecliptic. Because it is the plane that contains the earth as it orbits the sun, by definition it is also the plane that contains the sun as we observe it in its yearly journey through the stars.
The Sun _does not_ tilt. The Earth orbits around the Sun, and the plane of the Earth's orbit around the Sun is called the "ecliptic". Compared to the ecliptic, the axis of the Earth's spin is "tilted" at a little over 23 degrees. It is this "tilt" of the Earth's spin that causes the seasons. So, WHY is the Earth's spin axis "tilted"? We may never know for sure, but at least some scientists believe that it may be related to the planetary collision that created the Moon.