The Wiener index is a topological index of a molecule, defined as the sum of distances between all pairs of vertices in the chemical graph representing the non-hydrogen atoms in the molecule. Hexagonal chains consist of hexagonal rings connected with each other by edges. This class of graphs contains molecular graphs of unbranched catacondensed benzenoid hydrocarbons. A segment of a chain is its maximal subchain with linear connected hexagons. Chains with segments of equal lengths can be coded by binary words. Formulas for the sums of Wiener indices of hexagonal chains of some families are derived and computational examples are presented.