In the Sun, the convection zone reaches up to the solar photosphere and can thus directly influence the emergent spectrum. Traditionally, the effects of convection has been modelled with the local mixing length theory in theoretical 1D hydrostatic model atmospheres. In a different approach, we have performed realistic time-dependent, 3D, radiative-hydrodynamical simulations of the outer layers of the solar convection zone, including the photosphere. Both the different mean stratification and the presence of atmospheric inhomogeneities in 3D impact the spectral line formation. In a series of papers, we have applied our 3D solar model atmosphere to the problem of the solar chemical composition. Furthermore, we have adopted the best possible atomic and molecular line data and taken into account departures from LTE in the line formation when necessary. The inferred C, N, O and Ne abundances are all significantly lower than estimated from previous 1D modelling by 0.2-0.3 dex. These results have significant implications for a range of topics in contemporary astrophysics, including causing a severe headache for helioseismology.