A relativistic coupled-cluster (RCC) theory is implemented to study electron impact excitations of atomic species. As a test case, the electron impact excitations of the $3s ~ ^2S_{1/2} - 3p ~ ^2P_{1/2;3/2}$ resonance transitions are investigated in the singly charged magnesium (Mg$^+$) ion using this theory. Accuracies of wave functions of Mg$^+$ are justified by evaluating its attachment energies of the relevant states and compared with the experimental values. The continuum wave function of the projectile electron are obtained by solving Dirac equations assuming distortion potential as static potential of the ground state of Mg$^+$. Comparison of the calculated electron impact excitation differential and total cross-sections with the available measurements are found to be in very good agreements at various incident electron energies. Further, calculations are carried out in the plasma environment in the Debye Huckel model framework, which could be useful in the astrophysics. Influence of plasma strength on the cross-sections as well as linear polarization of the photon emission in the $3p ~ ^2P_{3/2} - 3s ~ ^2S_{1/2}$ transition is investigated for different incident electron energies.