The stretchiness of rubber is down to its structure, and the law of entropy. Rubber is made from long chains, which in their relaxed state can be twisted and curled around each other in a huge number of different ways. As it is stretched, the chains straighten out and line up, forming an orderly structure.
When the stress is removed, the strands want to return to a lower-energy disordered state, so they spring backward. In many types of rubber, the strands are joined together by chemical bonds that form cross links, fixing them into a flexible web and encouraging the material to spring back to a similar shape each time.