Using the drawing to the left, it is easy to see that the solar altitude, given by the angle beta, casts a longer shadow length L, when beta decreases. In fact L equals the fin height h divided by the tangent of beta. So the longest shadow cast, for the sundial depicted, will be on the Winter Solstice Day, and the shortest shadow cast will be on the Summer Solstice Day.
It is self-evident that sun dials only work well on sunny days, when the dial, really a fin, or stick, or gnomon, cast a shadow that is compared to a dial, or ruled surface. The fin (as shown here) is aligned with the local meridian, or north to south line.
Sundials are a nice addition to the backyard garden, but hardly a modern timepiece. Nevertheless, at one time not so long ago, they were the time piece of choice and necessity for most people.