J2 is a coefficient reflecting the gravitational effect of a body's (planet's or moon's) oblateness (extra width making it flatter than a perfect sphere), generally due to the body's rotation. J2 is of interest for space flight navigation and is measured by observing the flight of spacecraft near a mass. Its measure aids in modeling the composition of a body, thus measuring that of solar system planets is of interest. Cassini has been used for this with Saturn and Juno with Jupiter. A spherically symmetric planet has a J2 of 0 and the larger the J2, the more oblate.
J2 is one coefficient in a standard type of model of gravitational potential of such a body: a zonal harmonic gravity model and in the case of Earth, it is often termed a geopotential model (which term is also sometimes borrowed for other bodies). The word zonal indicates these are the coefficients that do not affect gravity's symmetry about the axis of rotation. The coefficients are called gravitational moments, and indicate gravitational the arrangement of mass other than that of a uniformly-dense sphere. The set of coefficients generally used presume the body is somewhat close to spherical, close to hydrostatic equilibrium and rotation is the major factor producing the moments. They are representations of the gravitational potential's spherical harmonic coefficients (those that are axis-symmetric around the axis of rotation), and are generally cited scaled to the body's size and radius so as to be dimensionless.
J3 is a similar coefficient but reflects asymmetry across the equator, thus is typically far less significant than J2. Further coefficients (J coefficients, J4, J5, J6, etc.) are symmetric across the equator if they are even-numbered. There are spherical harmonics corresponding to J0 and J1 but gravitational potential models are coordinated and scaled so J0 is taken as 1 (the coefficients are scaled to the total mass of the body) and J1 is 0 (the coefficients are based on the body's center of mass). The moments corresponding to other (non-axis-symmetric) spherical harmonics can be significant and of interest but the terms used vary. Also, various other names are also used for the coefficients and models described above.
All the solar system planets and the Sun are oblate from to rotation, and have a significant J2 coefficient. Jupiter and Saturn, with rotation periods of less than half an Earth-day, are the most oblate. It is also useful in modeling the behavior of rings. Values are improving with continuing measurement and analysis but here are some example determined values:
Determinations of the Sun's J2 put it in the general area of 0.00000022.