One of the reasons that Twain included the dialects in the novel is because he felt they were important. Important enough to start the novel discussing briefly the dialects he has included and how he went about learning about them.
One of the things that happens in the novel is that people are judged quite often by the way that they speak. Huck is considered uneducated by the widow and required to go to school and his father judges him for having learned things and likely speaking somewhat differently. The way people speak is actually considered a limiting factor, they should be in the group that corresponds to how they speak.
Jim is judged by the way he speaks as well, both the dialect and the constant connections to superstitious ideas. The duke and the king are successful because they know how to speak to people in such a way that they are considered powerful or rich or whatever they want to be considered at a given time.
Language is a very powerful force in the novel.