I would like to understand why bubbling of disks are said to be codimension 1 phenomena and bubbling of spheres codimension 2 phenomena.
Moduli spaces of psuedoholomorphic curves have an associated expected dimension, given by the Fredholm index of the appropriate CauchyRiemann operator; if an appropriate transversality condition holds then the moduli space will (at least at nonmultiplycovered curves) be a smooth manifold of actual dimension equal to this expected dimension. One would often like the moduli space to be compact, or at least to fail to be compact in a controlled way. Gromov's compactness theorem shows that one can obtain a compactification of the moduli space by adding in strata corresponding to various combinatorial configurations of sphere bubbles and also (if one is looking at curves with boundary on a Lagrangian submanifold) disk bubbles (in positive genus one should also allow for degenerations in the complex structure on the domain). For instance if one is looking at closed genuszero curves representing some homology class A+B, one possible stratum in the compactification would consist of pairs comprising a genuszero representative of A and a genuszero representative of B, with the two components intersecting each other at some point. For any such stratum one can compute the expected dimensiononce again this is the index of some Fredholm operator. The motto that "sphere bubbling is a codimensiontwo phenomenon" expresses the fact that strata involving sphere bubbles will always have expected dimension at least two less than the expected dimension of the main stratum. On the other hand when one considers compactifications of moduli spaces of holomorphic disks with boundary on a Lagrangian submanifold, some strata involving disk bubbles will typically have expected dimension just one lower than that of the main stratum. Of course one typically has to do some work to guarantee that the expected dimensions of all of the strata coincide with their actual dimensions. 

