We present a detailed derivation of a multi-site mean-field theory (MSMFT) used to describe the Mott-insulator to superfluid transition of bosonic atoms in optical lattices. The approach is based on partitioning the lattice into small clusters which are decoupled by means of a mean field approximation. This approximation invokes local superfluid order parameters defined for each of the boundary sites of the cluster. The resulting MSMFT grand potential has a non-trivial topology as a function of the various order parameters. An understanding of this topology provides two different criteria for the determination of the Mott insulator superfluid phase boundaries. We apply this formalism to $d$-dimensional hypercubic lattices in one, two and three dimensions, and demonstrate the improvement in the estimation of the phase boundaries when MSMFT is utilized for increasingly larger clusters, with the best quantitative agreement found for $d=3$. The MSMFT is then used to examine a linear dimer chain in which the on-site energies within the dimer have an energy separation of $Delta$. This system has a complicated phase diagram within the parameter space of the model, with many distinct Mott phases separated by superfluid regions.