We investigate the possibility that Bose-Einstein condensates, loaded on a 2D optical lattice, undergo - at finite temperature - a Berezinskii - Kosterlitz - Thouless transition. We show that - in an experimentally attainable range of parameters - a planar lattice of Bose - Einstein condensates is described by the XY model at finite temperature. We demonstrate that the interference pattern of the expanding condensates provides the experimental signature of the Berezinskii Kosterlitz - Thouless transition by showing that, near the critical temperature, the (k) over right arrow = 0 component of the momentum distribution and the central peak of the atomic density profile sharply decrease. The finite-temperature transition for a 3D optical lattice is also discussed in this paper, and analogies with superconducting Josephson junction networks are stressed throughout the text.