How do airplane designers determine flap deflection angles for flaps of various % wing chords?
As a rule of thumb, flap effectiveness (that is lift coefficient change per flap deflection angle or c$_{L\eta}$) is proportional to the square root of the flap's percentage. A more precise formula was derived by Hermann Glauert (search for the name and you will find that elusive answer by me)
What also changes is the hinge moment needed per degree of flap deflection; this, however, changes with the square of the flap's percentage. By trading off effectivity versus force, a designer will find the best flap percentage for each control surface.
Next, wind tunnel data is used for finding the effectiveness over deflection, because this value decreases with higher deflection angles and is hard to catch by CFD because viscous effects are strongest near the trailing edge and need lots of effort to model correctly. The desired control response and trim should be achievable with maximum deflections of below ±15° (the useable range is wider for smaller percentages) and the flight test will reveal whether the calculations were correct.