
The atoms in pony hooves are highly unstable. The excess of electrons in their distal phalanges exchange with the atom's electrons of any particular object. The exchange allows an impressive attraction, which the ponies have learned to manipulate to their advantage. This ranges, but not limited to, delicious juicy apples and snow shovels.
Here is a diagram to help the more visual learners understand this science.
As you can see, this transfer can be influenced by the nuerological system of the ponies, so they can grasp and ungrasp when the desire function of the brain is excited (this also seems subconcious...proven by the ponie's abilty to trott).
Pegasus ponies are born with a more highly sensitive system, hence why they can stand on loosely-densed clouds. By this logic, pegasus ponies can also walk on water, but this remains to be inconclusive given the chaotic nature of water (versus the highly predictable stagnant nature of cloud formations).
The reason Earth Ponies unable to walk on clouds is because through years of evolution they've hardened the callous ends of their hooves due to their increased hulk-like strength and apple bucking...making the transfer weaker, but still existant.
Unicorns utilize many of their excess electrons for magical feats unique to them. Their abilities are still present, but weakened since most of their electrons await use through magic in their horns.
Really when you look at it all from a fresh perspective, it all makes sense.