In order to investigate the quantum phase transitions and the time-of-flight absorption pictures analytically in a systematic way for ultracold Bose gases in bipartite optical lattices, we present a generalized Green’s function method. Utilizing this method, we study the quantum phase transitions of ultracold Bose gases in two types of bipartite optical lattices, i.e., a hexagonal lattice with normal Bose–Hubbard interaction and a d-dimensional hypercubic optical lattice with extended Bose–Hubbard interaction. Furthermore, the time-of-flight absorption pictures of ultracold Bose gases in these two types of lattices are also calculated analytically. In hexagonal lattice, the time-of-flight interference patterns of ultracold Bose gases obtained by our analytical method are in good qualitative agreement with the experimental results of Soltan-Panahi, et al. [Nat. Phys. 7, 434 (2011)]. In square optical lattice, the emergence of peaks at $$\left( { \pm \frac{\pi }{a}, \pm \frac{\pi }{a}} \right)$$ in the time-of-flight absorption pictures, which is believed to be a sort of evidence of the existence of a supersolid phase, is clearly seen when the system enters the compressible phase from charge-density-wave phase.