Many people were taught at school that you shouldn’t begin a sentence with either of these two words. It’s something that still causes heated debate.
The thinking behind this was, I believe, that and and but are co-ordinating conjunctions – words whose job it is to join two or more parts of a sentence together. (The other co-ordinating conjunctions are for, nor, or, yet and so).
Therefore, generations of schoolchildren were taught that these were to be used within a sentence rather than at the beginning.
However, I am going to disagree with the teacher here. Grammatically, there is no reason why and, but, or any of the others can’t go at the beginning of the sentence at all. In fact, using them sparingly can really help you emphasise what you want to say.
For instance, compare these:
Jim had spent weeks preparing for his exam, but on the day he missed his train and wasn’t able to sit the exam.
Jim had spent weeks preparing for his exam. But on the day he missed his train and wasn’t able to sit the exam.
The second example is more powerful. Starting the second sentence with “but” rather than using it mid-sentence really emphasises the significance of what happened.
Or try this one:
Some people think this is the best chocolate cake recipe in the world, and who am I to disagree?
Some people think this is the best chocolate cake recipe in the world. And who am I to disagree?
Again, this adds emphasis and also makes the writing more enjoyable to read as you have two shorter, varied sentences.
So I think it’s fine to use these terms sparingly, to make a point more effectively.
But don’t do it too often. And I really mean that.