In Trigun, Vash the Stampede is able to transform his arm into a big weapon with which he makes a hole in the moon. Is that transformation ever explained? Did he acquire this power after the spaceship crashed or did he have it since the beginning?
I don't know whether you have read the manga, so the following may be somewhat of a spoiler, because it reveals Vash's true identity.
a Plant. Plants are inter-dimensional beings that are tapped as a source of power and energy for the planet Gunsmoke. They are beings that can generate energy and even food and water based on environmental conditions. Plants were invented by humans, and are usually kept alive in light bulb shaped containers and used as a power source. Vash and Knives are independent Plants, meaning they can survive independently (other plants depend on being kept in a special environment in their containers) and even use their powers of their own conscious will. (1)
The ability to transform his arm is called Angel Arm, and it is a
natural ability of all Plants. It may take various forms, but is most known for it's usage by Knives and Vash in a form of a cannon. However, in order to activate the ability, they need a catalyst (such as the pistols in the anime).