In both atomic and nuclear spectroscopy, we can gain information about the spacing of the energy levels inside an object by exciting the object and then looking at the energy emitted when it transitions back to the ground state. In atoms, this energy is in the form of photons in the infrared/visible/UV range. In nuclear spectroscopy, this energy is emitted in the form of photons in the gamma-ray range (of course, some nuclei also tend to emit beta or alpha radiation, but this emission fundamentally changes the ground state of the nucleus, so at that point we're no longer studying nuclear structure anymore). The photons emitted from the transition of a nucleus back to the ground state are gamma rays because the spacing between energy levels in the nucleus is large.
The reason that photons are emitted during these transitions instead of gluons is because, though gluons are massless, they are themselves color-charged and hence tend to self-interact before they propagate very far. The practical consequences of this is that the strong force has a very short range, and therefore does not have much of an ability to transfer energy over macroscopic distances, unlike the photon, which is electrically-neutral and does not self-interact. This short "range" of the strong force is reflected in the effective field theory that describes the residual strong force via its use of massive force carriers. Pions have a mass of 135 MeV. In order to create an on-shell pion (i.e. a "real" pion, as opposed to a virtual pion, and importantly, one that is able to propagate long distances) during a transition, the transition must release at least that much energy. But 135 MeV is far more energy than almost any nuclear transition would release. In contrast, photons are massless, and can therefore be on-shell at any energy.
As for the use of a pion beam in scattering experiments, there are several reasons why this is not typically done. For instance, it's difficult to make a pion beam, certainly more difficult than making an electron beam. It's also more difficult to analyze the resulting collisions; even if the pion remains intact throughout the collision (which is not guaranteed), neutral pions do not show up in electromagnetic calorimeters, which easily detect electrons (electrons don't disappear during collisions, either, due to conservation of lepton number). In addition, due to the pion mass being much closer to the proton and neutron mass, it is more difficult to distinguish pions and protons/neutrons than it is to separate protons/neutrons from electrons. Pions also may decay on their way to the detector, in which case their trajectory must be reconstructed by inference from their decay products, whereas electrons do not. Finally, there's usually no real advantage to using a pion beam, as opposed to an electron beam, since what you're usually looking for in a spectroscopy experiment is how the intact nucleus reacts to an input of energy, whether that energy was deposited in the nucleus with a photon, a weak boson, or a gluon. That's not to say that people aren't using pion beams to probe interesting aspects of nuclear structure (neutron scattering is another useful tool that probes mainly the residual strong and weak interactions within the nucleus), but these are several reasons why they aren't the go-to experimental tool.