After a discussion in chat about control surface locks I was wondering why they need to be locked in the first place.
Why do they need to be locked?
What is the best position to lock them in? up, down, neutral.
Other folks have already addressed why we want to lock the flight controls when we leave the aircraft - "to prevent damage from gusts of wind", and "to keep the plane from doing interesting things in a strong breeze".
To the question of the "best" position to lock controls in, for light aircraft the general consensus is that the rudder and ailerons should be locked in the neutral position - In this position any wind blowing over the wings will cause them to lift uniformly, putting tension on the tiedown ropes holding the aircraft to the ground. (If the ailerons are locked at an angle one wing will generate more lift than the other, allowing one of the tiedown ropes to go slack.)
Elevators are a subject of a little more nuance and debate: It's generally considered best to lock the elevator in the "nose down" position (because any gusts of wind over the tail will push the nose down, rather than encouraging the nose to lift, this also means that those gusts will apply tension to a tie-down rope located at the tail rather than causing it to go slack).
On some aircraft locking the elevator in the nose-down (or nose-up) position opens up spaces that birds may try to nest in (for example, check out the tail of this Grumman) - some pilots prefer to lock the elevator of these aircraft in the neutral position to discourage avian visitors.
Generally it's better to lock the controls than leave them unlocked to bang around in the wind, so on some light aircraft not equipped with control locks pilots use the seatbelt to hold the controls in place. This often results in a "sub-optimal" control position (elevator fully nose-up, ailerons full-deflection left or right), but because the wind speed at which control surfaces may bang against their stops is usually lower than the speed at which the aerodynamically unfavorable control positions will substantially affect the aircraft this is a "lesser of two evils" approach.
In the small planes I fly, it is called a "Gust Lock", and consists of a small metal bar that fixes the yoke in position, so that the yoke cannot move (left/right, or forward/back), and by association, the ailerons and elevator cannot move either.
As the name implies, this is for dealing with Gusts of wind... a sudden bit of wind over an unlocked surface can move the surface to its extreme position until it hits a mechanical stop. If this happens repeatedly, say, over a stormy night, the repeated banging into a mechanical stop can create wear and tear on the surface, the control cables, or the yoke in the cockpit.
For gliders (probably other aircraft as well), there are two reasons to fix ailerons, elevator (and rudder) positions:
You want to avoid uncontrolled (potentially damaging) sudden movements caused by (repeated) wind gusts.
If you choose or allow unlucky positions/configurations, your plane might exhibit unwanted positional initiative (e.g. an aileron might motivate one wing to lift unexpectedly, hitting heads, tarmac or other obstacles). In mildly gusty conditions, wings are often temporarily fixed by additional weights (usually old tires or similar) to avoid that, too. As mentioned in the comments, this is not sufficient for anything more than average winds.