The electrostatic energy stored in a capacitor with capacitance [tex]C_0[/tex], with a voltage difference V applied to it, and without dielectric, is given by
[tex]U_0 = \frac{1}{2} C_0 V^2 [/tex]
Now let's assume we fill the space between the two plates of the capacitor with a dielectric with constant k. The new capacitance of the capacitor is
[tex]C_k = k C_0[/tex]
So, the energy stored now is
[tex]U_k = \frac{1}{2}C_k V^2= \frac{1}{2}kC_0 V^2 [/tex]
Therefore, the ratio between the energies stored in the capacitor before and after the introduction of the dielectric is
[tex] \frac{U_k}{U_0}= \frac{ \frac{1}{2}kC_0 V^2 }{ \frac{1}{2} C_0 V^2}= k[/tex]