EUV spectral lines of Mg VIII have been observed from the solar corona by Skylab, SERTS, and more recently by SOHO. Atomic data for this astrophysically important ion are presented in this paper. The atomic data include energy levels, oscillator strengths, transition rates, and electron-impact excitation collision strengths. Twenty levels are included by using the configurations 2s22p, 2s2p2, 2p3, 2s23s, 2s23p, and 2s23d. Collision strengths are calculated at five incident energies (15.0, 22.5, 30.0, 37.5, and 45.0 Ry) in the distorted wave approximation. The temperature of maximum abundance for this ion is log Te = 5.9 K. The rate coefficients are calculated at this temperature by averaging the collision strengths over a Maxwellian distribution. Proton rates and solar background radiation have been included in calculating level populations, and intensity ratios are calculated by including proton rates only. The relative intensity ratios are compared with observed ratios obtained from SERTS and SOHO/CDS to infer electron density in different solar features such as an active region, quiet-Sun, and off-limb. With a few exceptions, the predicted intensity ratios match observed values very well over a variety of instrumentation and solar conditions. Since Mg VIII has a number of strong EUV lines, we expect that the spectra of this ion should prove useful for abundance studies and other plasma diagnostics.