What determines how long a day is on a planet? A quick Google search shows that the day is about 116 (Earth) days for Venus, 1 day for Mars, 10 hours for Jupiter. I can't find an obvious connection between how long a day is with anything. Is it just random?
 A: 
I can't find an obvious connection between how long a day is with anything. Is it just random, a mystery?

Mainly it is conservation of angular momentum, and in a sense, random.
The blobs of the primordial cloud that became our solar system, sun in the center and planets rotating in stable orbits around it, at the center of mass of the system have an angular momentum, which, when the system separated to what we see now as a solar system, had to be conserved. 
How much of it went to the rotational angular momentum of the planets would depend on the process of formation of thei indiviual planets, and in that sense random. Once a rotating mass was formed conservation of angular momentum keeps it turning, unless tidal forces  reduce the angular momentum  and the planets become tidally locked, as surmised for the Trappist  planets. .
A: It is not random at all :   
In the Solar System the equation that governs the period of rotation of the planets, from Earth to Neptune,is (in hours)    
$rot = 25.513757010 + 6.355661671*10^{-9}*diam*mass - 0.000116821*diam - 0.000814341*dist$
( the precision better than 0.18% rules out any randomness )
data is from the Nasa - Planetary Fact Sheet
and
dist is the distance to the Sun
diam is the diameter of the planet
mass is mass of the planet
It is easy to justify that Mercury, Venus and Pluto do not fit the equation   
The above equation afaik was first written down by myself. 
EDIT ADD:
after 3 downvotes and strange comments not physically motivated.
Sure, I did not included de units of any of the terms but they are very easy to obtain after consulting the source of the data at the NASA link. If included the simplicity of the equation is lost.
And yes: it is numerology, but physically  motivated, because I did not provided the underlying model  upon which the equation can be obtained. But, nonetheless, that model do exist even if not stated.
The parameters mass, distance, diameter are all quantities linked to the angular momentum and being so they are all expected to be considered in a problem related to the angular rotation of the celestial bodies.
The important part that physically minded persons should not miss is the fact that the precision of 0.18%, included to all relevant planets (Mercury and Venus are not included intentionally), forbids any collision as explanation of the features of the solar system or one have to accept that the equation is a HUGE and highly unprobable coincidence.
I remind you all that when we do not know the why of something a blast or collision gets into the scene.  How convenient is the dissimulation of the ignorance.   
