Sadly, whitefly can be difficult to control - some people say impossible - because they have a very fast lifecycle; they can develop from egg to adult in as little as three weeks in the summer. This means that if you are using chemical pesticides to kill them (generally it is only the adult that is affected) you have to spray very regularly to control a severe outbreak. And then you have to be very vigilant to catch other outbreaks early. If you've only a few plants it is simpler to check over them regularly and squash adults and scales (you can just about see them) as soon as they appear.
There are a number of chemical pesticides that you can use on whitefly. Those containing bifenthrin and thiacloprid provide the best control.
In the greenhouse or inside at home you can catch them by hanging yellow sticky traps just above the leaves of plants - they are attracted to the colour yellow, which is why I've never been able to work out why growing-bags are that colour! Some people even vacuum their plants regularly to remove the little flying pests!
Biological control
Whitefly are best controlled in the greenhouse or in the home by biological control - using other insects that eat or parasitise them and so do the work for you. There are two available.
Encarsia is a small parasitic wasp which lays its eggs in the scales where the larvae develop and so kill the scale The larvae hatch into adults which find more scales to parasitise. However, once it has done its job there is no food source for the larvae and so the lifecycle stops. If a further outbreak occurs then you have to re-introduce the encarsia. Luckily, encarsia rarely kills all its hosts so there are usually some to carry on the lifecycle.
The second is delphastus, which is a member of the ladybird family. This predator eats all stages of the whitefly.
Both predators are available from various mail order firms including Defenders, who also has a very useful Pest Problem Solver booklet. Encarsia is available from Green Gardener, Just Green and Scarletts PlantCare.