Units of the factors. The numerical factor 21 is dimensionless, so the units of u are the product of the units of ε0 and E2:
[ε0]=N⋅m2C2,[E2]=(mV)2=m2V2
Product.
[u]=N⋅m2C2⋅m2V2=N⋅m4C2V2
Substituting 1V=1J/C. Thus C2V2=C2⋅(J/C)2=J2:
[u]=N⋅m4J2
Substituting 1J=1N⋅m. One of the two joules in the numerator is written as N⋅m:
[u]=N⋅m4J⋅(N⋅m)=N⋅m4J⋅N⋅m=m3J
Result.
[u]=J/m3
The quantity 21ε0E2 indeed has the dimensions of energy per unit volume: it is an energy density.