Mr. Campbell has a very small part in the novel, appearing only in the first chapter to send Davie off to the house of Shaws. But he's hugely important as the model for Davie's moral development: it's from Mr. Campbell that Davie has learned his Protestant religion and Royalist values. It's thanks to Mr. Campbell that Davie is so different from the Highland clansmen he meets later on in the book.
It's no accident that Davie's dear friend Mr. Campbell has the same last name as Alan's sworn enemy, Colin Roy Campbell. One of the primary themes of this book is the conflict between personal friendship and political beliefs. The fact that Alan and Davie can stay friends while they have such different loyalties demonstrates the possibility of individual friendship overcoming politics.