The short answer?
Twice a year.
Why does a piano's pitch change?
Piano strings change pitch for two primary reasons: the initial stretching and settling of strings when the piano is new, and soundboard movement due to humidity variation. In the case of new pianos, the pitch drops quickly for the first couple of years as the new strings stretch and wood parts settle. It's very important to maintain any new piano at the proper pitch during this period, so the string tension and piano structure can reach a stable equilibrium. (Most piano manufacturers recommend three to four tunings the first year, and at least two per year after that.)
Aside from this initial settling, climate change is the main cause of pitch change. That's because the piano's main acoustical structure -- the soundboard -- is made of wood. While wooden soundboards produce a wonderful sound, they also react constantly to climate changes.
As the relative humidity goes up, the soundboard swells, increasing its crowned shape and stretching the piano's strings to a higher pitch. Then during dry times the soundboard flattens out, lowering tension on the strings and causing the pitch to drop. The drop in the dry season tends to exceed the rise during humid times, so the net result is a drop in pitch each year that the piano isn't serviced.
Regular servicing by a qualified technician will preserve your instrument and help you avoid costly repairs in the future.