Why is the LHC circular and 27km long?
When you accelerate charged particles, they lose energy by emitting photons (a process called "Bremsstrahlung" or "braking radiation"). This is a nuisance in particle accelerators, because (1) you want to impart as much energy as possible to the particles being accelerated (that's the point!) and this is a loss; and (2) the bremsstrahlung can be in the form of harmful (to people and machines) ionizing radiation.
Stronger magnets are also necessary to produce the tighter turns.
Acceleration in the beam direction is, of course, unavoidable. But any time you have motion along a curved path, you also need acceleration perpendicular to the direction of motion in order to curve the trajectory.
In order to minimize this acceleration perpendicular to the direction of motion, it is desirable to have the accelerator be as straight as possible. If you are building a machine that accelerates particles along a closed path, this means you want to make the radius as big as possible. (I assume that, if you do the math, it turns out that a circular path (with uniform curvature) is better than an elliptical one, or one with long straightaways followed by tight turns.)
An alternative is to build a linear accelerator, which simply accelerates particles in a straight line. The Stanford Linear Accelerator (SLAC) is one such accelerator; and the International Linear Collider is in the planning phases.
Why is the LHC 27 km in circumference? Because they are re-using the tunnels from the Large Electron–Positron Collider (LEP), which was 27 km around.
Why was LEP 27 km around? It was almost certainly a balance between the science goals and the money available (longer tunnels = more expensive).
Check out the Superconducting Super Collider (SSC) on Wikipedia, the doomed American successor to LEP. It was going to be 87 km in circumference.
The LHC is a synchrotron, that is, a accelerator with a magnetic field confining the orbit on a circular path and using RF accelerating cavities to accelerate the particles.
The voltage provided by the cavities is limited (the order of MV) and thus a linear accelerator cannot achieve such high energies (of the order of the TeV) (although some projects of TeV linear collider are in development, CLIC and the ILC) because it would be extremely long. The idea is thus to have a circular path, the particle going through the cavities at each turn and gaining a small amount of energy each turn.
To have this circular path, we use a magnetic field, it does not accelerate the particles, but it provides a force perpendicular to the motion, thus allowing to bend the trajectory and to obtain a circular orbit.
Why does it have to be that long ? A fundamental relation for the synchrotrons is:
p = q B r
where p is the particle momentum, q is the charge of the particle, B is the magnetic field and r is the radius of curvature.
We can then see that to have a high momentum (and energy) we need a high magnetic field and a large radius.
In the LHC, the magnetic field is already at the limit of what a superconducting magnet can achieve (almost 8.5 T).
The LHC then needs a very large tunnel. For that it reuses the tunnel of the LEP which was also a synchrotron, but for electrons.
In that case the size of the tunnel is not really given by the same reasoning. We need to take into account the synchrotron radiation: any accelerated charge radiates energy in the form of a EM radiation: "light".
But the amount of radiation goes with the inverse of the fourth power of the mass, the electron being very light they emit a large amount of radiation. For protons, this effects is almost negligible, that's why it does count for the LHC.
But for LEP (and LEP gave it's tunnel to the LHC) this was the main limitation to the achieved energy. And to obtain a high energy, the larger the tunnel the better, because the amount of radiation decreases with the bending angle of the dipole magnets, meaning that a large radius leads to lower radiation.
Finally, the size of precisely 27 km was chosen for geographic consideration: the tunnel is between the Jura Mountains and the Leman lake, this implies strict constraints in the civil engineering.
Cyclotrons, while generally economic because of the reduced space and cost to build (compared to linear accelerators), suffer from two notable problems.
Note that the LHC is in fact a synchotron, which is notably improved over a cyclotron for relativistic (high energy) particles. The following principles still apply pretty well, however.
The magnetic field required to impart the centripetal acceleration on the particle to keep it in orbit is inversely proportional to the radius of orbit. Creating stronger magnetic fields requires larger and much more costly magnets. Maximising the radius of orbit helps reduce the required strength of magnetic field.
Maxwell's equations of electromagnetism indicate that an accelerating charge loses energy by emitting radiation. In fact, if you do the maths, this introduces the limit on the maximum velocity/energy of any accelerated particle. The larger the radius, the lower the centripetal force/acceleration, hence the lower the rate of energy loss.
To illustrate point 1, the force on a charged particle is given as
$$F = Bqv$$
where B is the magnetic field strength. And the centripetal force on a charge is given as
$$F = \frac{mv^2}{r}$$
where r is the radius of the particle accelerator tunnel from the centre of the orbit.
Equating the two gives
$$B = \frac{mv}{qr} = \frac{m\omega}{q}$$
Clearly, increasing the radius $r$ requires a lower $B$ (magnetic field).
Point 2 is slightly more involved to show, as one has to apply Maxwell's equations and calculate the energy flux emitted. Hopefully you get the point however.