  One of the most debated issues about sub-mJy radio sources, which are
responsible for the steepening of the 1.4 GHz source counts, is the origin of
their radio emission. Particularly interesting is the possibility of combining
radio spectral index information with other observational properties to assess
whether the sources are triggered by star formation or nuclear activity. The
aim of this work is to study the optical and near infrared properties of a
complete sample of 131 radio sources with S>0.4 mJy, observed at both 1.4 and 5
GHz as part of the ATESP radio survey. We use deep multi-colour (UBVRIJK)
images, mostly taken in the framework of the ESO Deep Public Survey, to
optically identify and derive photometric redshifts for the ATESP radio
sources. Deep optical coverage and extensive colour information are available
for 3/4 of the region covered by the radio sample. Typical depths of the images
are U~25, B~26, V~25.4, R~25.5, I~24.3, 19.5<K_s<20.2, J<22.2. Optical/near
infrared counterparts are found for ~78% (66/85) of the radio sources in the
region covered by the deep multi-colour imaging, and for 56 of these reliable
estimates of the redshift and type are derived. We find that many of the
sources with flat radio spectra are characterised by high radio-to-optical
ratios (R>1000), typical of classical powerful radio galaxies and quasars.
Flat-spectrum sources with low R values are preferentially identified with
early type galaxies, where the radio emission is most probably triggered by
low-luminosity active galactic nuclei. Considering both early type galaxies and
quasars as sources with an active nucleus, such sources largely dominate our
sample (78%). Flat-spectrum sources associated with early type galaxies are
quite compact (d<10-30 kpc), suggesting core-dominated radio emission.
