Context. Strong nebular emission is ubiquitous in galaxies that contribute to cosmic reionization at redshift z ≳ 6. High-ionization UV metal lines, such as CIII]λ1908 Å, show high equivalent widths (EW) in these early galaxies, suggesting harder radiation fields at low metallicity than low-z galaxies of similar stellar mass. Understanding the physical properties driving the observed UV nebular line emission at high-z requires large and very deep spectroscopic surveys, which are now only accessible out to z ∼ 4. Aims. We study the mean properties of a large representative sample of 217 galaxies showing CIII] emission at 2 < z < 4, selected from a parent sample of ∼750 main-sequence star-forming galaxies in the VANDELS survey. These CIII] emitters have a broad range of UV luminosities, allowing for a detailed stacking analysis to characterize their stellar mass, star formation rate (SFR), and metallicity as a function of the UV emission line ratios, EWs, and the carbon-to-oxygen (C/O) abundance ratio. Methods. Stacking provides unprecedented high signal-to-noise (S/N) spectra for CIII] emitters over more than three decades in luminosity, stellar mass, and SFR. This enables a full spectral fitting to derive stellar metallicities for each stack. Moreover, we use diagnostics based on photoionization models and UV line ratios to constrain the ionization sources of the galaxies and derive the C/O abundance. Results. Reliable CIII] detections (S/N ≥ 3) represent ∼30% of the parent sample. However, stacked spectra of non-detections (S/N < 3) show weak (EW ≲ 2 Å) CIII] emission, suggesting that this line is common in normal star-forming galaxies at z ∼ 3. On the other hand, extreme CIII] emitters (EW(CIII]) ≳ 8 Å) are exceedingly rare (∼3%) in VANDELS. The UV line ratios of the sample suggest no ionization source other than massive stars. Stacks with larger EW(CIII]) show larger EW(Lyα) and lower metallicity, but not all CIII] emitters are Lyα emitters. The stellar metallicities of CIII] emitters are not significantly different from that of the parent sample, increasing from ∼10% to ∼40% solar for stellar masses log(M⋆/M⊙) ∼ 9−10.5. The stellar mass-metallicity relation of the CIII] emitters is consistent with previous works, exhibiting a strong evolution from z = 0 to z ∼ 3. The C/O abundances of the sample range between 35%−150% solar, with a noticeable increase with FUV luminosity and a smooth decrease with the CIII] EW. Here, we discuss the CIII] emitters in the C/O–Fe/H and the C/O–O/H planes and we find that they follow stellar and nebular abundance trends consistent with those of Milky Way halo and thick-disk stars and local HII galaxies, respectively. A qualitative agreement is also found with chemical evolution models, which suggests that CIII] emitters at z ∼ 3 are experiencing an active phase of chemical enrichment. Conclusions. Our results provide new insights into the nature of UV line emitters at z ∼ 2 − 4, paving the way for future studies at higher z using the James Webb Space Telescope.