This depends on the approach you adopted in topology optimization, in the general case of "minimum compliance method" (the most widely used method in topology optimization field), the material elasticity tensor is computed in the same way as in finite element method.
You can extract the material elasticity tensor from nearly every finite element book. In the general framwork of topology optimization, for Isotropic Linear Elasticity, I advise you to read this paper : http://link.springer.com/article/10.1007/s00158-009-0430-0, in page 463 you can find the material elasticity tensor in the "MATERIAL INFORMATION" section.
For orthotropy and anisotropy, the tensor is little bit different.