Minecraft wiki entry for TNT_cannons, associated text: Body
Consider using a common material, such as cobblestone.
In multiplayer, when firing against another cannon, try to use materials with higher blast resistance. (For more on TNT cannon defenses, look below)
Another factor is visibility, which is one commonly overlooked. When making a cannon out of obsidian, it is hard to see redstone, and that can lead to fatal errors. On the other end, when setting up an ambush in the jungle, it is best not to make your cannon out of orange wool or lapis.
Wiring
There are two main sets of wiring in a cannon, the charge wiring which activates the charge, and the shot wiring that activates the shot.
Without any repeaters, which can be hard to get, a cannon is designated as manual, with 2 redstone power sources/blocks, such as buttons. For a manual cannon, the materials are simple, just a redstone wire that connects the charge to a redstone emitting item, and a wire that connects the shot to a redstone power source. However, this requires skill so as not to misfire, you must know when to activate each button.
With repeaters it is a different story. The maximum amount of time between the charge activating and the shot activating is ten repeaters set to 4. That will also bring you maximum range, will only require one redstone power source, and will require no skill to fire correctly.
Mounting block
Mounting blocks (described below) are only certain special blocks.
Explosion housing
Unless it's a dry cannon, this must be water or lava (in the latter case, only source blocks). The liquid prevents the cannon and any other surrounding blocks from being destroyed.