I assume you mean the solar day (determined e.g. as the average time between two sunrises). Although you didn't say it, I also assume that you want a planet in the habitable zone (otherwise you've got much more freedom in your choices).
You want a planet orbiting a small star, ideally a red dwarf, on the inner edge of the habitable zone, and in addition a large moon orbiting the planet in an orbit with period longer than the planet's day.
The two fundamental determining factors are the rotation of the planet (obviously) and the revolution of the planet around the central star. Basically the solar day is the sidereal day (rotation period of the planet) times one plus or minus (sign depending on the rotational direction of the planet relative to its revolution) the inverse of the number of days in the year.
The revolution period (year)
The effect of the revolution period (the length of a year) is low if there are many days per year, but the slower the rotation/the faster the revolution, the larger is the effect. The most extreme case is when the planet is tidally locked to the star, so that the sidereal day is exactly the same length as a year; then the solar day is infinite (the sun always sits on the same place).
The revolution period is, of course, determined by the stellar mass and the planet's distance to the star. The condition centripetal force = gravitational force reads
G m M/r^2 = m omega^2 r
(G is the gravitational constant, M the star mass, m the planet mass, r the distance, and omega the angular velocity) and thus for the revolution time (length of year), T = 2 pi/omega, you get
T = 2 pi r^(3/2) / (G M)^(1/2) ~ r^(3/2)/M^(1/2)
(here ~ means "proportional to").
More massive stars are generally brighter and therefore habitable planets will be further out; the distance is proportional to the square root of the stellar luminosity (brightness), because the light intensity falls off with the square. The mass-luminosity relation says that the luminosity of a main sequence star (the most common type of star, and especially the type you'd expect life-bearing planets around) scales roughly with the mass to the power of 7/2, so the distance of a habitable planet should be proportional to the stellar mass to the power of 7/4. Inserting this in the above equation, you get
T ~ M^(5/4)
so the year's length grows with the mass of the central star, although the dependency is not too strong. To have a maximal effect on the day length, you want the year as short as possible, that is you want to have a small star (ideally a red dwarf), and you want your planet on the inner edge of the habitable zone. As it turns out, small stars are also the most likely to have life-bearing planets, since they have the longest life time. The search for habitable planets indeed concentrates on red dwarfs.
The rotation period (sidereal day)
The by far biggest effect on the day length has, of course, the rotational speed of the planet. The rotational speed is normally determined by the initial angular momentum when the planet formed, but may also be altered subsequently by large collisions (as for example the collision of the earth with another planet which gave us our moon).
After that, the rotational speed is reduced by tidal forces due to the inhomogeneity of the gravitational field of other bodies.
All planets observe tidal forces from the central star; however the tidal forces fall off with the third power of the distance from the star, while they are proportional to its mass. Inserting the previous estimation of the planet's distance as function of the stellar mass, you get
F_tidal,star ~ M^(-7/4)
To have the strongest effect, you want the star's tidal force to be as large as possible (OK, maybe not too large, or you'll end up with a tidally locked planet), which due to the negative exponent in the mass again means you need a small star mass, and of course again you want to be on the inner edge of the habitable zone.
However, the star is not the only source of tidal forces; indeed, on earth the biggest tidal forces don't come from the sun, but from the moon. So to further slow down the planet's rotation, you want a large moon. Of course the moon should be sufficiently far away that its revolution period is slower than the planet's day, as if it is faster, you'll get the opposite effect: The moon will spin the planet up.
And of course, how much the planet was spun down by tidal forces depends very much on the age of the planet. An old planet will be slower than a newly formed one. Of course an old planet implies an old star, that is a long-lived one, so we are again back at the requirement at a small star.