Why does the PH3 geometry deviate more from the trigonal planar one, than does NH3? $\ce{PH3}$ has a more bent structure than $\ce{NH3}$. The HOMO-LUMO gap for $\ce{PH3}$ is smaller than for $\ce{NH3}$, and so the distortion from the trigonal planar geometry is said to be larger. However, why is the HOMO-LUMO gap smaller for $\ce{PH3}$? 

It should be possible, I suppose, to argue for why this is so by using qualitative molecular orbital theory, and from looking at the construction of the molecular orbital diagrams, but I am not sure how to construct accurate MO diagrams for $\ce{PH3}$ and $\ce{NH3}$.

In the answer to the possible duplicate question, it seems to be taken for granted that some distortion from the planar structure is stabilizing. In my question, the starting point is the planar structure, and then looking at why $\ce{PH3}$ is in a more distorted geometry than $\ce{NH3}$, relative to the planar structures.

This distortion is often explained in terms of the "HOMO-LUMO gap", but I fail to see how the HOMO-LUMO gap can be assessed qualitatively in order to predict which of $\ce{NH3}$ and $\ce{PH3}$ is in a more distorted geometry. So what factor ultimately leads to the smaller HOMO-LUMO gap in $\ce{PH3}$? $\ce{BH3}$ exists in a trigonal planar geometry - why is not this molecule pyramidalized?
Apparantly it was community consensus that this question be clear enough to stay open.

Neither $\ce{PH3}$ nor $\ce{NH3}$ have any incentive whatsoever to assume a trigonal planar geometry. The most stable ground state of both nitrogen and phosphorus atoms is $n\mathrm{s^2},\ n\mathrm{p^3}$ where $n = 2$ for nitrogen and $n=3$ for phosphorus. Since the p-orbitals are higher in energy per se, it makes sense to use them for bonding and lower their energy — which, as a side note leads to much more efficient overlap than using s-orbitals for bonding, since p-orbitals have a direction in space.

Therefore, the most stable geometry for both would be trigonal pyramidal with $90^\circ$ angles between the substituents. This would allow all-p bonding orbitals and an all-s lone pair on the central atom. If you check out $\ce{PH3}$, you will find almost exactly that geometry save a little distortion.

The distortion you see in $\ce{PH3}$ is of the same type as the one which moves the hydrogen atoms much further apart in $\ce{NH3}$: Steric stress. The hydrogens themselves repel each other; they require a certain space. Around a large phosphorus atom there is enough space for them to crowd at the ideal bonding angle while the small nitrogen does not offer that space. The final bond angle of $\approx 107^\circ$ is a fine-tuned result of trying to keep the hydrogen atoms as far away from each other as necessary and keeping the bonding angle as close to $90^\circ$ as possible.

$\ce{BH3}$ is an odd one out in this comparison. Boron does not have a lone pair and thus we expect isolated $\ce{BH3}$ to assume trigonal planar geometry. However, we also expect isolated $\ce{BH3}$ to have a low stability since boron does not have an octet. Hence it dimerises to $\ce{B2H6}$ with two $\ce{B-H-B}$ banana bonds of the 2-electron-3-centre type. The result can be described as a distorted tetrahedron around boron.