What caused the earth to tilt?
This is called the Giant-Impact hypothesis which states that a planet about the size of Mars called Theia collided with earth about 4.5 billion years ago. This in turn also created the moon. The evidence supporting this is in part that the Moon and the Earth have very similar orientations. Before this impact, the earth's axis was at a perfect 180 degrees perpendicular to that of the sun. Due to this collision, however, it is now tilted at 23.5 degrees