J2 is one coefficient in a standard type of model of Gravitational potential of a planet called a Geopotential Model. The coefficients are called Gravitational Moments, and indicate gravitational mass arranged other than that of a uniformly-dense sphere. J2 specifically reflects a planet's Oblateness (flattening) due to 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 planet, thus measuring that of Solar System planets is of interest. Cassini has been used for this with Saturn and Juno will be so-used with Jupiter.
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.
The J Coefficients (J0 through infinity) are gravitational-potential Spherical Harmonics coefficients, specifically those that are symmetric around the planet's pole. These are generally the most significant coefficients for large rotating bodies (planets and stars), J2 being the most significant. They are termed Gravity Harmonics or Gravitational Harmonics, making up a Gravity Spectrum or Gravitational Spectrum of the body.
J3 is a similar coefficient but reflects asymmetry across the equator, thus is typically far less significant than J2. Further coefficients (J4, J5, J6, etc.) generally are symmetric across the equator if they are even-numbered.