You might want to check out solar potential maps.
This gives you your "on average" potential power harvested for the Earth, by summing up the daily solar potentials - which builds in accounting for weather, night etc. According to this map, the best areas are near the equator in Chile and slightly north of the equator in Chad/Libya/Sudan, which produce around $2800 kWh/m^2$ per year - roughly $320 W/m^2$.
On Mars, the calculations are slightly more difficult. Mars' irradiance is roughly $590 W/m^2$ - half that of Earth. Mars barely has an atmosphere, however - it's around 0.5% of Earth's so we can essentially ignore atmospheric effects. Temperatures on the Martian equator vary significantly - around $25 ^oC$ at noon, and around $-60 ^oC$ at night (I have no idea how this varies with Mars' orbit, so take that as you wish). Given that the panels won't be operating at night, and Mars has an Earth-ish temperature at day, I don't think temperature is too big of a factor - Mars is colder than Earth, but Solar panels don't mind the cold. NASA is running solar powered rovers on Mars, and they seem to be doing fine, until they got caught in dust storms.
Dust storms are a big problem. According to this research paper from 1993, there is a 1 in 3 chance of a planet-wide dust storm occurring on Mars every year. These last a few weeks - a few months, on average. There are also "smaller" continent sized dust storms which last a few weeks as well. For the sake of argument, lets say that there is a 10% chance that our base is in a dust storm at any given point in time. Martian dust storms vary in intensity - lets say that, on average, 2/3 of sunlight is blocked. Accounting for the day-night cycle, we have a solar potential of $275 W/m^2$ - this seems like an estimate on the high end, and a low end estimate is probably around $200 W/m^2$.
Again, these figures are just potentials. I haven't accounted for efficiency (around 20% - feel free to calculate that if you want). I also haven't accounted for the panel lifespan - on Earth, this is 15-20 years. On Mars, I expect this to be significantly lower due to dust storms.
EDIT: Martian Irradiance
EDIT2: According to folks who did detailed calculations on Reddit, the average value for irradiance is right around 100-120 W/m^2. This figure better accounts for dust storms, variations in orbital distance, Martian tilt, etc. This means that Martian solar panels, at max, would be around 1/3 as efficient as their most efficient counterparts on Earth.