On the first night of Pesach, we say two blessings over the matzahs.
The first blessing, hamotzi, is the usual blessing we say when eating bread. Since this blessing is always best to say on a whole "loaf," we therefore put an unbroken matzah on top of the stack.
The second blessing, asher kideshanu, is the special blessing we say for the commandment to eat matzah on this night. This blessing applies especially to the broken matzah, because this matzah symbolizes our broken, impoverished state as slaves in Egypt. Since this blessing is second, the broken matzah is second in the stack.
The third matzah is just there to complete the idea of lechem mishneh, which means that on Shabbat and festivals we use two whole loaves instead of just one, so it goes on the bottom. According to widespread custom, this bottom matzah is let slip from the hands before the second blessing is said. (According to some, no third matzah is used at all.)
- Mishnah Berurah 473:57, 475:2