why is gamma ray ejected during radioactive decay? Why are gamma rays are emmited? Why is it not that an x ray or infrared or ultraviolet or cosmic or microwave ray is emmited?
 A: Gamma ($\gamma$) decay isn't the only form of radioactive decay of course but it's an important one (and often follows quickly on the heels of other decay modes).
A nucleus emits a $\gamma$ photon when it's in a excited state of energy, say $E_1$. When falling back to the lowest level of energy (the ground state) $E_0$, a photon is emitted with energy $\Delta E=E_1-E_0$.
Because of the nature of the nucleus the energy levels tend to be very high, the energies $\Delta E$ of the photons are correspondingly high, usually in the order of magnitude of about $1 \text{ MeV}$ (mega electronvolt).
That energy range is covered by $\gamma$ rays.
The other forms of radiation you referred to are too low in energy to be emitted by a nucleus (except for cosmic rays which require a different mode of generation altogether).
A: Gamma rays are an emission in the radioactive decay of a nucleus from some excited state to a lesser-excited state. A nucleus can be excited in a number of ways, including absorbing a neutron or a proton, or it could be the product of the decay of a different nucleus which leaves it ending up in an excited state. A law in physics says that nucleii want to be in their lowest energy state. This means that our excited nucleus needs to find a way to release some of it's energy. One way of it doing this is gamma decay (two other ways are beta decay and alpha decay, and there are more still). 
A gamma photon is specifically different from an x-ray. Gammas almost always are of a higher energy but there are some gammas of lower energy than some x rays. The actual distinction is in how each of these forms of EM radiation are produced.
The reason it's not "infrared or ultraviolet" is because we've defined as such. Gamma photons are specifically defined as the photons emitted in the radioactive decay of a nucleus. It's not infrared or ultraviolet in the same way that it's not a horse or a telephone.
