I rarely fly bomber formations but my take on it is this.
Since each bomber in the formation counts as a sortie, they also each score perks based on their individual performance. Meaning that if each bomber destroyed a builiding and earned 0.5 perk each (just made up numbers here, it depends on building- and bomber type) and 2 landed safely while one died, you would earn.
0.5*1.25 + 0.5*1.25 + 0.5*1.00 = 1.75
If all 3 returned it would be 1.875, if only one returned it would be 1.625 and if all died you would get 1.5.
Basically the bombers that return get the 25% bonus, the ones that get any other result (ditch, death, bail ect.) doesn't.
Now if one of your bombers have been shot down it depends on whether it actually had earned any perks before that. If it didn't you wouldn't have earned more perks by returning it. You COULD imagine all damage done to a building happend by just one of your bombers, in which case you (perk wise) can ignore whether or not the other two planes return. Hope that makes sense.
So just to sum up and make sure I have answered your questions I take them here.
do you get more, less, or the same amount of perk points if you go in a formation, if you go solo bomber?
You will get more in 99% of cases with formation since you simply do more damage.
if formation, how many planes do you need to make it back in? do points change if you start out in three, and only come back with 2 or one?
You will get a 25% perk bonus for each plane that returns, whether in formtion or not. Each plane has it's own perk calculation, so the perk points earned could be different depending on which plane in the formation you loose.