M2 is a version of the Magicgate Memory Stick, the Micro version. Its propriatery Sony as they developed it and therefore only usually found in Sony products.
MicroSD is the micro version of Secure Digital, an open-format not tied into any particular manufacturers, leading to more usage, which means lower costs thanks to more volume in mass production.
Both have their pro's and cons, but the biggest of course is cost.