What are the pros and cons of sealing the gap between the wing and the aileron?
This will become a long answer again.
The most important benefit of an internally sealed aileron is reduced control forces. Ailerons require lots of attention to keep forces small while still avoiding a negative force gradient (that is when the aileron runs into its stops all by itself). In most manually controlled airplanes the ailerons become stiff as a brick at high speed and the designers of airplanes like the P-47 and the Do-335 even used telescopic sticks which would give the pilot a longer lever arm at high speed, albeit at the price of a smaller deflection range. But the larger deflections were impossible to steer anyway …
Only when much care is put into aileron design will control forces be manageable at high speed. Examples are the Supermarine Spitfire or the Junkers Ju-88. To be able to control the plane with only two fingers on the yoke at 500 km/h required several hours of flight testing and adjustable aileron hinges in case of the Ju-88. Another fine design is the English Electric Canberra (known as the Martin B-57 to you Yanks) which had a spring between stick and ailerons. The pilot would only move one side of the spring while the other would move the control rod running to the ailerons. On the ground, you could move the yoke easily ±60° while someone else would keep the aileron from moving - that is how soft that spring was. Now you have a moving mass and a spring - what comes to mind? Flutter! This was a very risky design and it shows how desperate the engineers were to get the aileron forces down. And of course those ailerons were sealed. With an internal seal.
You can either use a brush seal or a cloth seal, but in all cases you need something protruding forward of the hinge line into a cavity inside the rear wing. This restriction will keep maximum deflections down to less than ±20° but will produce the best aerodynamic balance. In case of the Canberra, the chord of this forward plate was almost 40% of the aileron chord, measured from hinge to trailing edge. This is what it takes to compensate &gt;90% of the aerodynamic force. The F-86 Sabre ailerons were similar and used a cloth seal while the Canberra used a brush seal (IIRC). The downside is the maintenance and care to keep the cavity clean. Especially water trapped there which freezes as the airplane climbs into colder air can produce unpleasant surprises.
If you only fly slowly, an external seal is also possible. This is popular on gliders where sometimes the hinge line is placed as closely as possible to the lower skin in order to seal the aileron gap with a sticky tape. More elaborate seals use a thin metal ribbon like in the picture below on a PA-28. The main benefit is a higher aileron effectiveness and a very slight drag reduction. The downside is a bit more friction and more care to keep the seal in shape.

Exernal seal (picture source). I would have preferred to show that of the ASW-20C here, but could not find a decent picture online. The ASW-20C tries to extend the laminar run on the lower side across the flap and aileron hinge line with its seal.
External seals only improve the aerodynamics and aileron effectiveness, but don't help with the stick forces. Since only one side can be the one with the hinge, the opposite side still has a gap.
So why would you prefer to have a vented aileron? First, this allows for higher deflection angles. Second, now the aileron nose can be shaped such that it helps to tailor the stick forces. Case in point: The Frise aileron.

Frise aileron (picture source)
At very small deflection angles the nose of the aileron stays within the airfoil contour. This allows for a stiff centering of the ailerons, so you can feel when the ailerons are neutral. Note that a Frise aileron should be combined with aileron trim! When the deflection increases, the nose of the trailing-edge-up aileron will poke out of the contour and produce a suction peak which forces the aileron to an increased deflection. This force now is transmitted via the linkage to the opposite aileron and helps to force it trailing-edge down. This means at moderate deflection the stick forces become pleasantly low. Once the aileron deflection is too high for the flow to stay attached to the aileron's suction side, the pressure distribution over the aileron changes, the forces increase rapidly and the stick forces tell the pilot that he has reached the limit of the useable range. At high speed this helps to prevent overstressing the wing while at low speed the aileron can be deflected further, maximizing its effectiveness. The picture above mentions drag - this helps to reduce adverse yaw a bit, but the main reason for a Frise-type aileron should be lower mid-range stick forces.
Why else would a vented aileron be preferable? The gap reduces aileron effectiveness but keeps the flow attached at higher deflections. This gives more control authority at the price of increased drag. But there can be more: A clever way to install vortex generators can be found on the Short Belfast:

Tail of the Short Belfast from below (own work). Note the vortex generators hidden in the hinge gap - they only move out into the airflow when they are needed: When the elevator is moved to large negative deflections. This is not an aileron, admittedly, but the same can be done at the aileron, too.
To summarize:
Pros of internal seals:

much lower control forces at high speed
good aileron effectivity

Cons of internal seals:

limited deflection range
have to be kept clean all the time

Pros of external seals:

No gap on one side, lower drag
good aileron effectivity

Cons of external seals:

a bit more friction
care is needed when handling the delicate seals

Pros of vented ailerons

allow to tailor stick forces and reduce adverse yaw
higher deflection angles possible, especially at low speed

Cons of vented ailerons

more drag
lower effectivesss