Huck and Jim have several different costumes while on the raft. These all represent, at various points, the pair's ability to adapt stories to any situation, as well as their inability to escape the influence of society. For example, Huck dresses as a girl at one point in order to discover information about his "death" and Jim's perceived guilt. Later, when the duke and dauphin come, Huck dresses as a British valet (or at least the way they imagine on might dress). This allows him to come ashore with the criminals. Jim is dressed erratically as a "sick Arab" in order that he may move about the raft freely in the day. However, both Huck and Jim are tied to those characters. Huck cannot leave the duke & dauphin, and Jim cannot leave the raft. So, even as they gain a little freedom, they're still tied to their stories and invented personalities.
However, one important aspect of Huck and Jim's dress on the raft has nothing to do with other peoples' influences, or even clothes at all: they often go naked on the raft. The lack of clothes is just as symbolic as those they do wear. It represents the freedom and return to nature that the river offers them both. Alone, on the raft, they can be completely free from the restrictions and rules of society, and revert to their true natures. It is only when others invade their world (such as the duke and dauphin) that they must return to society and wear clothes.