Using either of these conjunctions to begin a sentence is generally considered unacceptable formal English, but even that prohibition is lessening. You will find it everywhere in fiction and in much other writing, including some academic articles. It is a stylistic choice that should be made rarely and very carefully, keeping the audience’s preferences in mind. Here is what Merriam Webster’s Dictionary of English Usage has to say about it:
Everybody agrees that it’s all right to begin a sentence with an *and,* and nearly everybody admits to having been taught at some past time that the practice was wrong. Most of us think the prohibition goes back to our early school days. Bailey 1984 points out that the prohibition is probably meant to correct the tendency of children to string together independent clauses or simple declarative sentences with “ands”:
“We got in the car and we went to the movie and I bought some popcorn and . . .”
As children grow older and master the more sophisticated technique of subordinating clauses, the prohibition of “and” becomes unnecessary. But apparently our teachers fail to tell us when we may forget about the prohibition. Consequently, many of us go through life thinking it wrong to begin a sentence with “and.”
“Many of us were taught that no sentence should begin with ‘but.’ If that’s what you learned, unlearn it; there is no stronger word at the start. It announces total contrast with what has gone before, and the reader is primed for the change” (Zinsser 1976).
Everybody who mentions this question agrees with Zinsser. The only generally expressed warning is not [emphasis mine] to follow the “but” with a comma, as in this example:
“But, hasty, ill-considered and emotional prohibitions can seriously threaten individual industries” (Annual Report, Owens-Illinois, 1970).
Sometimes it is acceptable and even effective to begin with conjunctions. You may have been told never to begin with “and” or “but,” but if you really want to emphasize the added information, and your text is not too formal, you can do it. Just avoid that comma.