Context. High-precision determinations of abundances of elements in the atmospheres of the Sun and solar twin stars indicate that the Sun has an unusually low ratio between refractory and volatile elements. This has led to the suggestion that the relation between abundance ratios, [X/Fe], and elemental condensation temperature, T C , can be used as a signature of the existence of terrestrial planets around a star. Aims. HARPS spectra with S /N 600 for 21 solar twin stars in the solar neighborhood and the Sun (observed via reflected light from asteroids) are used to determine very precise (σ ∼ 0.01 dex) differential abundances of elements in order to see how well [X/Fe] is correlated with T C and other parameters such as stellar age. Methods. Abundances of C, O, Na, Mg, Al, Si, S, Ca, Ti, Cr, Fe, Ni, Zn, and Y are derived from equivalent widths of weak and medium-strong spectral lines using MARCS model atmospheres with parameters determined from the excitation and ionization balance of Fe lines. Non-LTE effects are considered and taken into account for some of the elements. In addition, precise (σ 0.8 Gyr) stellar ages are obtained by interpolating between Yonsei-Yale isochrones in the log g -T eff diagram. Results. It is confirmed that the ratio between refractory and volatile elements is lower in the Sun than in most of the solar twins (only one star has the same [X/Fe]-T C distribution as the Sun), but for many stars, the relation between [X/Fe] and T C is not well defined.