So when working on a solar panel design, you tend to start at the top level. Your fundamental requirement is the amount of panel area you need, and this is determined based on your mission requirements for:
- Power generation. How much power do I need to generate?
- Distance from Sun. How much solar energy is reaching my spacecraft (at the furthest point)?
- Incidence angle. Of that energy, how much is expected to be transferred to my panel? This is usually given an assumed value at early stages. It is worth noting that this is not always 90 degrees, as some spacecraft (eg. BepiColombo) deliberately tilt their panels for thermal reasons.
- Solar panel/array efficiency. How much of the solar energy striking my panels is converted to electricity, and how much of that electricity makes it to my power system/storage?
- Combination of mission duration and panel degredation rate. Solar cells lose efficiency over time, so you have to calculate the area you will need at the planned end of your mission and not the start.
- Margin. Depending on where you are working, you will likely have a standard for how much margin to apply and where to apply it. This will usually add a percentage to the area calculated to be safe.
These factors determine the rough preliminary area requirement, I can probably edit some formulae into my answer at a later date if desired.
Once you have this area, and more becomes known about the design of your spacecraft, you flesh out the design further. The question seems to focus on the shape/appearance of the solar panels, so I will focus on that and not address the finer details of the electrical, thermal, or structural designs as none of these are anything I have much experience in.
From a shape standpoint, the challenge becomes how do you fit this area you require into the spacecraft configuration. I would say three aspects drive the design from this point of view.
- Launch. Your s/c has to fit into the launch vehicle and/or deployer. This means that the panels, if large, must be folded up into a small enough area to fit. The area available within the launch vehicle faring or deployer drives the panel folding design. A simple example: CubeSats are deployed from what is essentially a box with rails known as a P-POD, which has a small margin on each edge that panels could be folded into. Thus the folded panels (if deployable) must be smaller than the size of one side of the satellite, and thinner than the margin between the satellite and the edge of the P-POD. In general, if a larger area must be fit into a smaller envelope, a more complex folding method must be used or the area reduced.
- Operations. Which way will the satellite be pointing in space, and what can the panels block/not block while doing this? You cannot put the panel where it will block, for example, the view from the camera your s/c is using for science. Another example is that some methods of electric propulsion could cause extreme degradation if you placed the panel in the exhaust of the engine. At the same time, you need to ensure that the panels are not in the shadow of the spacecraft (where possible), and have the correct incidence angle with the sun. This drives the location which the panels are placed on the spacecraft, their shape when deployed, and whether a a Solar Array Drive Assembly (SADA) to orientate the panels is necessary.
- Risk and complexity (and associated cost). The more moving parts, the more that can potentially go wrong with a mission. This is why many small CubeSats opt to operate with body mounted solar panels if their power requirements allow, as they then avoid the cost, complexity, and risk associated with solar array deployment. Another measure often taken is that the "folding" of deployable arrays is done so that when folded up, the outer-facing part of the array will be capable of generating power, even if the deployment fails. The designer has to consider how "risky" the design is, which is often based on whether and how much the design or a similar one has been flown on previous s/c. Similarly, the more complex or innovative the design, generally the higher costs associated with realising this design. These criteria are essentially the reality check on the design.
Based on these three considerations, and others (eg. thermal as things pointing at the sun tend to get very hot in space), you would generally carry out a trade-off to determine the "best" design for your use case by weighing the various factors. I realise that this answer is quite vague, as there are a lot of criteria to consider when developing a detailed configuration design but I hope this answers your question!
Edit: Another more niche aspect I forgot is drag. Earth's (or any planet with one's) atmosphere creates drag on a spacecraft, that causes it to reduce in orbit altitude over time. For spacecraft orbiting low to Earth, large solar panels could greatly reduce the mission length or increase the propulsion requirements. Extremely low orbiting spacecraft tend to prefer body-mounted or smaller solar panels for that reason. This also effects the configuration considerations, as asymmetrical panels thus introduce a (small) moment on the s/c. Solar radiation pressure can have a similar effect, also introducing a force on the panels and s/c.