Introduction and Region of Focus
The reason you may not necessarily want to be in the Arctic or Anarctic circle (which are by definition the regions where 24-hour days occur) is because of the losses associated with transmission of light through the earth’s atmosphere.
When the sun shines at any angle except straight overhead, the distance traveled through the atmosphere is more than the height of the atmosphere.
To nail down a time, I’ll assume we are optimizing on the Summer solstice.
During the summer solstice, the sun will pass directly above points on Tropic of Cancer, $23.5^o$ N. Above or below, the sun is not direct at any point during that day. As we increase latitude, duration goes up but average distance through atmosphere goes up too. So we know the ideal latitude is above that.
Also on the solstice, we get a 24-hour day on the arctic circle, $66.5^o$ N. Such days occur at all higher latitudes, but the sun goes through more of the atmosphere. Below that, the sun goes through less atmosphere, but days get shorter.
Therefore, we already know our optimal location is between 23.5 $^o$ And 66.5$^o$ N or S.
Salient Factors
There are three factors to consider:
Average (mean) of the $cos(\cdot)$ of the incident angle (after we’ve selected the optimal fixed angle)
Duration of sun.
Average of the $log(\cdot)$ of the distance through the atmosphere that the light travels.
Regarding 3, rays of sunshine lose energy when they travel through the atmosphere (light decreases intensity due to scattering and absorbing, particularly the shorter wavelengths). The sun can be shining anywhere from perpendicular to the earth’s surface, up to perfectly tangent. (Assuming some clear delineation of where the atmosphere ends.)
At the tropic, distance through atmosphere is minimized, but in our range of interest this is also the shortest day, and is exactly 12 hours.
At the arctic, duration is maximized at 24 hours, but distance is at the maximum also.
More Details
If perpendicular, the distance through the atmosphere is just $$d=h_a$$, the height of the atmosphere. By some definitions this is $500 km$, as compared with the earth’s radius $6,400 km$.
If shining tangent to the surface, then using trig, the distance through atmosphere is (units 10^6 meters):
$$ d= \sqrt{(R+h)^2-R^2}= \sqrt{2hR+h^2} = \sqrt{6.4+0.25} =2.6$$
Over five times as far.
Even though losses vary by altitude, the increase in distance is the same for all elevations. The proportion of energy remaining (one minus the portion lost) after going through the atmosphere can be called $m (<1)$, then the portion of sunlight that gets through, for other distances, is:
$$ k=m^{(\tfrac{d(\alpha)}{h})} $$
Where $d$ is a function of the incident angle $\alpha$, which in turn is a function of latitude $\lambda$ and time of day. Time of day expressed in the rotation of the earth, $\theta$.
Over the course of the solstice day, for a given latitude, total energy reaching the spot is
$$E=\int_{0}^{2 \pi}e \mathbb{I}_t(\alpha(\theta)) m^{(\tfrac{d(\alpha)}{h})}cos(\alpha) d \theta$$
Where $\mathbb{I}_t(\cdot)$ is the indicator function for $\alpha < \frac{\pi}{2}$,
meaning not nighttime, and $e$ is the power contained in an area of sun equal to the area of the panel. This can be assumed constant, as can $m$. An alternative to the indicator function is imposing divergence on $d(\cdot)$ beyond $d=2.6$.
Direct, overhead sun, $\alpha = 0$, only occurs at $\lambda=23.5^o(=0.41)$ and $\theta=0$. The minimum $\alpha$ for each latitude is $\lambda-0.41$, and the maximum is $\frac{\pi}{2}$. The optimal fixed angle for the panel is also clear now. Set it angled South of perfectly horizontal at an angle of $\lambda-0.41$ (in the Northern Hemisphere).
Only item still needed for optimization:
$d(\alpha (\cdot ,\cdot))$ in terms of $\lambda , \theta$. Calling all meteorologists.