The Moon is a unique natural laboratory for the study of the deep space plasma and energetic particles environment. During more than 3/4 of its orbit around the Earth it is exposed to the solar wind. Being an unmagnetized body and lacking a substantial atmosphere, solar wind and solar energetic particles bombardthe Moon's surface, interacting with the lunar regolith and the tenuous lunar exosphere. Energetic particles arriving at the Moon's surface can be absorbed, or scattered, or can remove another particle from the lunar regolith by sputtering or desorption. A similar phenomenon occurs also with the galactic cosmic rays, which have fluxes and energy spectra representative of interplanetary space. During the remaining part of its orbit the Moon crosses the tail of the terrestrial magnetosphere. It then provides the opportunity to study in-situ the terrestrial magnetotail plasma environment as well as atmospheric escape from the Earth's ionosphere, in the form of heavy ions accelerated and streaming downtail. The lunar environment is thus a unique natural laboratory for analysing the interaction of the solar wind, the cosmic rays and the Earth's magnetosphere with the surface, the immediate subsurface, and the surface-bounded exosphere of an unmagnetized planetary body. This article is part of a discussion meeting issue 'Astronomy from the Moon: the next decades (part 2)'.