This topic has been covered before and you may find some interesting comments on previous threads using the search facility.
Before anyone can really begin to answer your question with any degree of precision, you need to be more specific as to what your anticipated electrical supply demand is or is likely to be.
A small caravan with a couple of led down-lights, single occupancy with the 'van unattended most of the day and little or no radio or television usage is likely to require a lot less power regeneration than a family living in a twin axle caravan with a dozen halogen down-lights, electric pump, microwave, radio and Tv dependent, laptop and mobile telephones in use/on charge throughout the day and well into the evening.
I'm not going to comment on the potentially anti-social side to generators as that was not your question. I am fortunate enough to have both a 'silent' (that term is debatable)! inverter generator that peaks at 2000w (1600w maximum continuous supply) and a 120w solar panel.
We started with the generator because we suffer from power cuts at home (3 this week already) and found it useful for running all of the house essentials whilst away (tv, hair drier etc etc).
We bought the panel just this summer as it is more aurally friendly to your neighbours than the generator (although we do have 50m of weatherproof/waterproof cable to put the generator out of earshot of all but the most receptive of people).
The panel coped easily for the two days it was working at a rally where the sun shone one day and was heavily cloudy the other. Family of three on that occasion, radio on for most of the wet/cloudy day, couple of Dvd's watched and some tv also on both days. Lights used sparingly etc but the panel coped no problem at all....in fact it bolstered the battery level! remember that a solar panel will only provide 12v power so you may need to purchase 12v compatible kit (extra expense that you may need to factor in to your equation).
My advice, if you can afford it: buy one of each. Select which you want to take with you, where you are going, with whom you will be staying, what your likely needs will be, what time of the year you will be travelling etc.
Each have their merits, both have uses outside of the camping/caravanning world but I think the generator just pips the panel for all round usability due to its ability to provide 240v supply also. (But then a panel can be used in the rain)!
Your question is likely to split the forum members opinion as there is definitely an anti-generator lobby; but used sparingly and considerately it can be a very useful piece of kit ........and you could find yourself a very popular (or unpopular depending on when and for how long you choose to use it) neighbour for those whose batteries need a quick 'top-up'!
I have both, but would suggest that a decent solar panel is probably the best all rounder, as many sites do not allow generators at all. Solar panel prices have dropped by a lot in the last year or two, so go for the most powerful that you can comfortably afford.
The difference between the two is that a generator is a 240 volt supply and a solar panel a 12 volt supply. Many prefer to use a solar panel these days but both solar power and generators have disadvantages in one way or another. If you want to do winter caravanning then the demand for power is greater but you get less daylight hours in winter so a solar panel can be rendered useless unless you have a relatively powerful one to absorb the limited daylight for charging so the advantage then is a generator. During the summer months a solar panel can be somewhat more of an advantage but on dull days the light absorbed is reduced which may not re-charge the leisure battery fully so a boost from a generator would be required. This has happened at some time or another with some caravanners who just solely use a solar panel and have asked for assistance from someone who does have a generator. Most people I know now have both units and use the generator solely as a back up because if the battery ends up being only part charged then a solar panel is likely to struggle to replenish the power you need so basically it's down to personal choice as there isn't an answer to actually say which one of the two is best. If you do decide to have both then it is important to disconnect the power supply from the solar panel whilst the generator is actively replacing the charge because if you try to load two inputs of power simultaneously it could damage the solar panel control unit.
Once the unit is paid for, Solar is free, Genny's need fuel.
------------- Yesterday is already a dream and tomorrow is only a vision, but today well lived makes every yesterday a dream of happiness and every tomorrow a vision of hope.
Amazing family weekend with old steam engines, classic car displays, market stalls, and full catering and bar. And camping on site - Save £25 by booking in advance.