In this work, the electronic structures and optical properties of AB3O6 (A = Bi, Sb) are examined conducting the first-principles method at crystal and molecular level. The results show that the anionic groups and cation-centered polyhedra exhibit excellent optical properties due to their strong covalent bonds and optical anisotropy. The SbO and BiO groups own different responses of polarization anisotropy and first hyperpolarizability, resulting in different optical properties. Moreover, the states nearby the Fermi level of SBBO give positive and negative contribution to birefringence and SHG, which make it own stronger birefringence and smaller SHG comparison with BIBO.