How do trees manage to grow equally in all directions?
There are some other good answers which provide part of the picture, but I think there is a fundamental organising principle which has been missed. Konrad has touched on it in his answer.

The reason trees, and most plants, tend to grow equally in all directions is that they have iteratively generated branching and radial symmetry which is controlled in a feedback loop of the growth promoting hormone auxin and auxin-sensitive auxin transporters. This is an elegant biological algorithm which explains all branching growth.

The things Konrad identifies (phototropism, gravitropism, etc.) serve as orientation cues which help the plant determine which axes to grow along, but fundamentally the process is about auxin gradients. There are exceptions, as others have pointed out in their answers, and they usually result from severe imbalances in the orientation cues.

I'll try to explain the growth process clearly (and it gives me an opportunity to try my hand at diagramming again ^_^)...



Auxin is a plant hormone (actually a class of hormones, but mostly when people say auxin, they mean indole-3-acetic acid) which promotes cell elongation and division. The basic principle which allows auxin to act in the organising way it does is that auxin is produced inside cells, and proteins which export auxin from a cell develop on the side of the cell which has the highest auxin concentration (see figure below).



So auxin gets transported up the concentration gradient of auxin! Thus if you get an area of high auxin concentration developing somehow, more auxin is then transported towards that area. An area of high auxin concentration relative to the surrounding tissue is called an auxin maximum (plural 'maxima').

For most of the life of the plant, auxin is produced pretty much equally in most cells. However, at the very early stages of embryo development, it gets produced preferentially along the embryonic axis (see figure below, part 1). That creates a meristem - a group of cells where cell division is taking place - at the auxin maximum at each end of the embryo. Since this particular meristem is at the apex of the plant, it is called the apical meristem, and it is usually the strongest one in the plant.



So by having a meristem at each end, the embryo then elongates as cell division is only taking place at those points. This leads to part 2 of the image above, where the two meristems get so far apart that the auxin gradient is so weak as to no longer have its organising effect (area in the red square). When that happens, the auxin produced in cells in that area concentrates in a chaotic way for a short time until another center of transport is created. This happens, as the first one did, when a particular area of the tissue has a slightly higher concentration of auxin, and so auxin in the surrounding tissue is transported towards it. This leads to part 3 of the figure, in which two new meristems are created on the sides of the plant (called lateral meristems).

Lateral meristems are where branches occur on plants. If you then imagine this process continuing to iterate over and over, you will see that the branches, as they elongate, will develop meristems at the tips and along the sides. The main stem will also continue elongating, and develop more lateral stems. The root will begin to branch, and those branches will branch, etc. If you can understand how this elegant system works, you understand how plants grow, and why they grow in repeating units as opposed to in a body plan like animals.

It also explains why, if you cut off the tip of a stem, it promotes branching. By removing the apical meristem, you get rid of the auxin gradient and enable the creating of multiple smaller meristems which each develop into branches.

So far I've explained regular branching, but the same system causes the radial symmetry which makes trees (usually) grow in all directions equally...



Imagine taking a cross section through a stem and looking down all the way through it (as depicted crudely above). Just as auxin gradients act to coordinate growth along the length of the plant, they also coordinate it radially, as the maxima will tend to space themselves out as far from one another as possible. That leads to branches growing in all directions equally (on average).

I welcome comments on this answer, as I think its so important to understanding plant growth that I'd like to hone my answer to make it as good as possible.