  We study the phase transition of thin films in the three-dimensional XY
universality class. To this end, we perform a Monte Carlo study of the improved
two-component \phi^4 model, the improved dynamically diluted XY model and the
standard XY model on the simple cubic lattice. We study films of a thickness up
to L_0=32 lattice spacings. In the short direction of the lattice free boundary
conditions are employed. Using a finite size scaling (FSS) method, proposed
recently, we determine the transition temperature with high accuracy. The
effectively two-dimensional finite size scaling behaviour of the Binder
cumulant U_4, the second moment correlation length over the lattice size
\xi_{2nd}/L, the ratio of the partition functions with anti-periodic and
periodic boundary conditions Z_a/Z_p and the helicity modulus \Upsilon clearly
confirm the Kosterlitz-Thouless nature of the transition. We analyse the
scaling of the transition temperature with the thickness L_0 of the film. The
predictions of the renormalization group (RG) theory are confirmed. We compute
the universal ratio of the thickness of the film L_0 and the transversal
correlation length \xi_T in the three-dimensional thermodynamic limit at the
Kosterlitz-Thouless transition temperature of a film of thickness L_0:
[L_{0,KT}/\xi_T]^* = 1.595(7). This results can be compared with experimental
results on thin films of 4He near the \lambda-transition.
