This is commonly accomplished by distributing carbon or other conductive particles throughout the raw material prior to setting it.
[1] Carbon black and silica are common additives to induce conductivity in elastomers.
Silica has been studied more so than other additives due to its low cost however, its conductance is also lower.
Making solar cells and various sensors able to stretch and bend would allow them to be incorporated into wearable electronics.
A novel approach for the design of an elastomer that actually increases conductivity with strain has recently been published.