Although the solutions above are more comprehensive, a less-comprehensive but possibly more simple approach - since the collisions are all axis-aligned rectangles, you could just compare the differences between the vertical edges and between the horizontal edges to see which has 'entered' the most.
By vertical edges, I mean the length between the right edge of the player and the left edge of the platform, and by horizontal edges, I mean the length between the bottom edge of the player and the top edge of the platform. If horizontal length is greater, place on top, otherwise fall.
Chances are, the collision detection code will probably be comparing these edges already so it's just a matter of storing the lengths and then you can work with those.
Of course, you'll need to use different edges for different corners.