From a medieval nickname for a courteous or good-looking person (from Middle English boner "gentle, courteous, handsome"). A notable bearer of the surname was Canadian-born British Conservative politician Andrew Bonar Law (1858-1923), prime minister 1922-23.
A "translation" of Irish Gaelic Ó Cnáimhsighe "descendant of Cnáimhseach", a nickname meaning literally "midwife" and ostensibly a derivative of Gaelic cnámh "bone".