Power produced and internal resistance of solar cell vs distance from light source
There are radiometric equations that describe the nature of the light source, its power and how it spreads away from the source. It does follow the 1/d^2 law, but you also have to take into account how much light from the source it is gathering. 


  If we are interested in the characteristics of this source in a distance r that is much larger than the geometric dimensions of the source itself, we can neglect the actual size of the source and assume that the light is emitted from a point. As a rule of thumb, this approximation is justified if distance r is at least 10 times larger than the dimensions of the light source.


The sun in most cases can be approximated to a light source, a light on a bench cannot. 

This involves a unit called a solid angle (steradians) which is analogous to the square of an angle (or also can be thought of as the ratio of a sphere that is captured). Both the source and the surface of the object receiving the energy need to be taken account

The energy point source can be described as \$ E_{r} = \frac{\Phi_{source}}{4\pi r^2}\$

Note:I am going to summarize other effects that are required to find the power on the cell, because I can't include everything, its book size. This is just the incident power of the source the surface (of the solar cell). Keep in mind that if you change the angle of the surface of the solar cell it will also change the area seen by the source. And also the power is given across a frequency range of light.

After you find the incident power across a surface (the solar cell) there are other effects that contribute to the efficiency calculation. The solar cell reflects some light, the PV array is also not a solid surface (there are gaps between the cells) and the materials in the PV array only convert some photons to mobile electrons at specific wavelength bands.  

This is all wrapped up into one big efficiency number \$ \eta \$, and it usually comes from testing with an equivalent light source to the sun. 1000 W/m^2 is a common source benchmark for testing (they do all the radiometery calculations on their end), and try and match the black body or temperature curve of the sun as close as possible. They then measure the output of the cells. IF the source power is 1000W/m^2 and measure power of the cell (or incident power) 23.3W and the cell\module area is 0.1 m^2 then the effencency calculation is $$ \frac{P_{inc}}{P_{source}} \frac{23.3W}{1000\frac{W}{m^2} 0.1m^2} = \eta = 23.3% $$

So back to your question, the power does follow the 1/d^2 (or r^2 as I prefer) but you'll find that the power of the sun is so large and the d number changes so little with respect to the power and the solid angle of the cell that it doesn't change. One of the biggest factors that does change is the angle relative to the sun, and that is dependent on latitude, the time of day and how the cell is installed relative to the ground. 

The relationship between Rp and P, is not only determined by source resistance because a solar cell consists of diode junctions. Diodes have a current voltage relationship. Whithout getting into the details of source resistance and IV curves, I'll just say the power is maximized at a certain point in the curve. To find this point you need a MPPT tracker to draw just enough current that you don't pull the voltage down