The properties of a carbon nanotube are dependent on its atomic structure. The atomic structure of a carbon nanotube can be defined by specifying its chiral indices, (u, v), that specify its perimeter vector (chiral vector), with which the diameter and helicity are also determined. The fine electron beam available in a modern transmission electron microscope (TEM) offers a unique probe to reveal the atomic structure of individual nanotubes. This review covers two aspects related to the use of the electron probe in the TEM for the study of carbon nanotubes: (a) to understand the electron diffraction phenomena for interpretation of the electron diffraction patterns of carbon nanotubes and (b) to obtain the chiral indices, (u, v), of the carbon nanotubes from the electron diffraction patterns. For a nanotube of a given structure, the electron scattering amplitude from the carbon nanotube is first described analytically in closed form using the helical diffraction theory. From a known structure as given by the chiral indices (u, v), its electron diffraction pattern can be calculated and understood. The reverse problem, i.e. assignment of the chiral indices from an electron diffraction pattern of a carbon nanotube, is approached from the relationship between the electron scattering intensity distribution and the chiral indices (u, v). We show that electron diffraction patterns can provide an accurate and unambiguous assignment of the chiral indices of carbon nanotubes. The chiral indices (u, v) can be read indiscriminately with a high accuracy from the intensity distribution on the principal layer lines in an electron diffraction pattern. The symmetry properties of electron diffraction from carbon nanotubes and the electron diffraction from deformed carbon nanotubes are also discussed in detail. It is shown that 2mm symmetry is always preserved for single-walled carbon nanotubes, but it can break down for multiwalled carbon nanotubes under some special circumstances. Finally, determination of the handedness of carbon nanotubes using electron diffraction is reviewed and discussed with both theoretical analysis and experimental examples.