Start with a search on this topic.
Then, like MB Doc says, you need to figure out how to pull the codes. Many, many causes of this behavior. On mine, it was a faulty brake light switch. You'll waste a lot of time until you pull the codes.