How to make mesh bend as bone

Here is result I get:

The armature influences geometry = moves vertices around.
In your case there are just the eight corner vertices of the cubical arm: What is there to move for the bones?

You need some extra edge loops at the places where you want the mesh to bend.