Most printed photos are in 3:2 aspect ratio (4x6,6x9, 8x12, 10x15, 12x18, 16x24, 20x30, 2446).
Some are 5:4 (4x5, 8x10 and 16x20).
And 5:7 (5x7)
Obviously there are others but the implication is for "normal" photo prints that 3:2 is the correct ratio to use and every photo that might be printed either needs to be tested that cropping to fit doesn't break the print or as a work around should have a border added.
The simplest resource I found on this was over on Shootproof.
Next is the issue of what resolution is required for different sizes, let's ignore anything truly odd and go for standard sizes and most printing talks about 300 dpi which I have worked from, higher pixel dimensions are fine and lower can be used (this is simple multiplication!). The reality is that this if often higher than what is actually required hence in brackets is a minimum, why? Well some commercial printers output at anywhere from 200ppi so in brackets I have included the resolutions many sites suggest are acceptable.
4x6 : 1200 x 1800 (1000x1500)
5x7 : 1500 x 2100 (1250x1750)
8x10 : 2400 x 3000 (2000x2500)
16x20: 4800x7200 (2448x3264)
....so you can see it is easy to extrapolate up.
There are lots of explanations but I liked this one.
For larger prints :
A2 (420x594mm) 4970x7016 (min 2480x3508) - 16mp camera will do the job.
A1 (594x841mm) 7016x9933 (min 3508x4967), 20mp camera.
A0 (841x1189mm) 9933x14043 (min 4967x7022), 24mp camera.
Of note above these sizes viewing distance may change the actual resolution required (lowering it!).
Remember that on screen DPI is normally listed as 72 ppi and helps reduce output file sizes.