Why not build a particle accelerator on ground level? What is the shallowest feasible depth to build one? Assume you wanted to build a particle accelerator in a non-commerical/non-residential area.  It costs more money the deeper you want to build it, therefore you want to build it as close to ground level as possible. 
Why aren't particle accelerators built on ground level?  What is the shallowest depth at which particle accelerators can be feasibly built, and what are the equations such as synchrotron radiation or luminosity interference (or, at least, the phenomena, and not necessarily the equations behind them) that determine this?
My speculation:
Some situation (forgot where and when) in which a stray particle from an accelerator hit someone ended in them from the effects of being by a high-energy (hadron?).  Also, a Fermilab researcher who taught one of my classes told us about one of the times in which some loose particles found their way out of the accelerator and shot an inches-wide hole through a steel beam in a fraction of a fraction of a second.
Now, I doubt the particle-accelerator engineers sat down in a conference and said 'we must build them below ground or else particles beams could tear through people' but this is the only drawback I know of that comes with a ground-level accelerator; it can accidentally release fairly high-energy particles that can hit things.
Solar radiation might also have notable effects, but I am not sure.
 A: One thing not yet mentioned is structural stability. The Large Hadron Collider (LHC) at CERN is about 100 metres underground. 
In the other answers it was argued why you want to be a few metres underground (radiation shielding), but even though the LHC can reach the highest energies of any accelerator built by humanity, so far, this depth is a bit excessive. Even considering the mentioned fact that it is easier to built underneath people's houses than evacuate three small towns, your final building depth will be determined by other factors.
The reason it is so far underground is that at that depth there is a hard granite layer, whereas above it is only relatively soft green sandstone. The collider being 27km long, keeping all parts in alignment as much as possible is very important (since you need micrometer precision at the collision points). Resting on this granite layer, the alignment then only depends on the phase of the moon (shifting the ground up, but even more so the nearby Lake Geneva), as well as the recent rainfall (again, because of the amount of water in Lake Geneva).
For further reading (for example why not all parts are at the same depth and why the accelerator is neither level nor plane) have a look this brochure:
CERN-Brochure-2017-002-Eng  (page 20).
So sometimes digging deeper than strictly necessary for radiation protection is still cost-effective (otherwise the collider would not even work).
A: An issue that is largely glossed over by the other answers is simple economics.
Circular particle accelerators are unbroken rings with diameters often measured in miles. This is a very large amount of real-estate that you need to limit access to if you build above ground. Not only is there the above-ground land you need for the housing of the accelerator, there's the space that you've now cut off (assuming you don't elevate the accelerator to allow traffic to pass below).
Linacs, on the other hand, while requiring a lot of space, don't cut off so much land, and are often found above-ground (SLAC or SAL being examples)
A: The main reason for going underground is that the earth above provides some radiation shielding. An accelerator where everything is working properly is (outside the beam pipe) a relatively low-radiation environment.  However if you have a steering or focusing magnet malfunction, so that the beam spills out of the pipe, you can briefly generate lots of prompt radiation.
The amount of shielding that you need depends on the energy of the accelerator.  For example,


*

*The 12 GeV electron accelerator at JLab is seven or eight meters underground --- just a couple of flights of stairs.

*The 1 GeV proton machine at the Spallation Neutron Source is actually at ground level, but there's an earthen berm above it.

*The (shuttered) 25 MV tandem accelerator at ORNL actually did most of its acceleration in a tower aboveground, and the various beam pathways are in a single above-ground building.
The lower the energy of your accelerator is, the less you need earthen shielding for safety reasons.
Another answer points out that background-limited experiments go underground to reduce cosmic ray backgrounds. This is a reason to put your detectors underground, but not necessarily a reason to put your accelerator underground.
A: Particle accelerator facilities are complicated beasts and they have several parts. Two subsets of thee systems have different reasons for being underground.


*

*The beam generation, acceleration, steering and focusing mechanisms generate ionizing radiation (by bremsstrahlung and beam scraping mostly). Some parts of some system generate a lot of radiation. These parts need shielding to protect people and a pile of dirt is a cheap way to get that shielding.  
The civil construction costs are usually lowest if you dig a shallow tunnel and then pile the dirt so obtained back over the top, and this is a common pattern for accelerators build in areas with relatively low population density.
Currently running example: CEBAF at Jefferson Lab in Newport News, Virginia, USA.

*The detector system used to do science with the beams detect all kinds of radiation and large detectors get many signals from cosmic rays. These detector systems can benefit from being put underground where the overburden reduces the cosmic ray background, though this is mostly of interest in neutrino physics where even with intense beams the rate at the detector is quite low.
Unfortunately the cosmic rays consist largely of muons (because the atmosphere is enough shielding to reduce the contribution of less penetrating components) and have a spectrum that goes up to very high energies, so it takes a lot of overburden to significantly reduce the background.
Currently running example: LHC at CERN in Geneva, Switzerland.
As a matter of universal policy facilities with beam intense enough to cut through the vacuum components of the accelerator if badly mis-steered (which has happened—briefly because the machine doesn't operate when the vacuum is compromised—at more than one lab) don't run the machine with people in the enclosure. This isn't really from worry that people will actually get hit by the beam, but because the radiation generated by the running apparatus represents a severe threat to human health.
A: It's because of shielding, according to the official CERN website:

Why is the LHC underground?
The LHC uses the tunnel that was built to house CERN’s previous large accelerator, the LEP, which was dismantled in 2000. Digging an underground tunnel proved to be the best option for a 27-km machine, since it’s cheaper than acquiring land to build on at the surface and the impact on the landscape is minimised. In addition, the Earth’s crust provides good shielding against radiation.

Also because building such large ring-shaped devices underground is actually often cheaper than building on the surface, since you do not need to acquire a huge amount of land.
