We consider a collection of bosonic modes corresponding to the vertices of a graph Γ. Quantum tunneling can occur only along the edges of Γ and a local self-interaction term is present. Quantum entanglement of one vertex with respect to the rest of the graph (mode entanglement) is analyzed in the ground state of the system as a function of the tunneling amplitude τ. The topology of Γ plays a major role in determining the tunneling amplitude τmax that leads to the maximum value of the mode entanglement. Whereas in most of the cases one finds the intuitively expected result τmax = ∞, we show that there exists a family of graphs for which the optimal value of τ is pushed down to a finite value. We also show that, for complete graphs, our bi-partite entanglement provides useful insights in the analysis of the crossover between insulating and superfluid ground states.