My theory is that those are like palm scanners. Much like humans have unique friction ridge patterns on our fingers and palms, these ponies have a unique pattern on the underside of their hooves - inside the heart shape area. They could also have a suction feature like a gecko’s.