We present a theoretical study of a nanowire made of a three-dimensional topological insulator. The bulk topological insulator is described by a continuum-model Hamiltonian, and the cylindrical-nanowire geometry is modelled by a hard-wall boundary condition. We provide the secular equation for the eigenergies of the systems (both for bulk and surface states) and the analytical form of the energy eigenfunctions. We describe how the surface states of the cylinder are modified by finite-size effects. In particular, we provide a $1/R$ expansion for the energy of the surface states up to second order. The knowledge of the analytical form for the wavefunctions enables the computation of matrix elements of any single-particle operators. In particular, we compute the matrix elements of the optical dipole operator, which describe optical absorption and emission, treating intra- and inter-band transition on the same footing. Selection rules for optical transitions require conservation of linear momentum parallel to the nanowire axis, and a change of $0$ or $pm 1$ in the total-angular-momentum projection parallel to the nanowire axis. The magnitude of the optical-transition matrix elements is strongly affected by the finite radius of the nanowire.