The normal recommendation for how often a piano should be tuned is twice a year. The reason for this is seasonal climate change. Here in Long Island, the climate is constantly undergoing changes. Over the course of a year the climate moves from humid and warm in the height of summer to very dry in the winter. Pianos, being made mostly of wood, respond to changes in temperature and humidity. If you've ever noticed how drawers and doors stick in the summer and free up in the winter, you have seen how wood can "breathe" -- which is expand in the summer and contract in the winter. Pianos breathe also, and that movement of the wood is enough to affect the tuning on the piano.
Having the piano tuned twice a year is usually sufficient, in most cases, to keep the piano sounding good and to provide minimum maintenance.
Some people are more sensitive to small amounts of out-of-tune-ness and like to have their piano tuned more often. One extreme example: It is not uncommon to see a piano tuner touch up the tuning on a concert piano during intermission even though it was tuned right before the performance.
New pianos (that is, pianos right out of the box) need to be tuned at least four to six times before it will hold a tune properly. The usual recommendation is to tune it four times during the first year or two. The reason for this is that the piano needs to break in. Strings will stretch and drop in pitch until they become used to carrying the tension that they were designed to hold. The soundboard and bridges need to become acclimated to carrying downward pressure as well. After the break-in period has passed, normal maintenance is sufficient.
Sometimes old pianos (over 40 or 50 years old) that have been neglected or abused can have tuning stability problems. They also may require tuning more frequently than twice a year.