It's a net language. It's like poser noun and pretentious adjective in English. It reminds me a similar word: zhuang-bility(装逼), which denotes the same meaning. B格 is just the extent of zhuang-bility(装逼).
So, 略有B格的一句话 means the sentence with a tone of being slightly pretentious.