In this work, the unit cell of the phononic crystal having the maximized band gap is designed for various lattice types by the topology optimization. Previous researches were limited to a square lattice only, but the present study deals with general lattice structures since the lattice type significantly influences the band gap characteristics. To calculate the band gap of the unit cell, the eigenanalysis of the unit cell with the imposed periodic condition is performed by the finite element method. For optimization, the object function is set to maximize the lowest eigenvalue of the upper branch and minimize the highest eigenvalue of the lower branch. The bound formulation is adopted for the simultaneous minimization and maximization problem. It is expected that the optimized results can be utilized to design wave filters, beam splitters, sound or vibration protection devices, or waveguides with broader band gap.