Here we present the results of various approaches to measure accurate colours and photometric redshifts (photo-z) from wide-field imaging data. We use data from the CanadaFranceHawaii Telescope Legacy Survey which have been re-processed by the CanadaFranceHawaii Telescope Lensing Survey (CFHTLenS) team in order to carry out a number of weak gravitational lensing studies. An emphasis is put on the correction of systematic effects in the photo-z arising from the different point spread functions (PSFs) in the five optical bands. Different ways of correcting these effects are discussed and the resulting photo-z accuracies are quantified by comparing the photo-z to large spectroscopic redshift (spec-z) data sets. Careful homogenization of the PSF between bands leads to increased overall accuracy of photo-z. The gain is particularly pronounced at fainter magnitudes where galaxies are smaller and flux measurements are affected more by PSF effects. We discuss ways of defining more secure subsamples of galaxies as well as a shape- and colour-based stargalaxy separation method, and we present redshift distributions for different magnitude limits. We also study possible re-calibrations of the photometric zero-points (ZPs) with the help of galaxies with known spec-z. We find that if PSF effects are properly taken into account, a re-calibration of the ZPs becomes much less important suggesting that previous such re-calibrations described in the literature could in fact be mostly corrections for PSF effects rather than corrections for real inaccuracies in the ZPs. The implications of this finding for future surveys like the Kilo Degree Survey (KiDS), Dark Energy Survey (DES), Large Synoptic Survey Telescope or Euclid are mixed. On the one hand, ZP re-calibrations with spec-z values might not be as accurate as previously thought. On the other hand, careful PSF homogenization might provide a way out and yield accurate, homogeneous photometry without the need for full spectroscopic coverage. This is the first paper in a series describing the technical aspects of CFHTLenS.