We calculate from first principles the electronic structure and optical properties of a number of transition metal dichalcogenide (TMD) bilayer heterostructures consisting of MoS2 layers sandwiched with WS2, MoSe2, MoTe2, BN, or graphene sheets. Contrary to previous works, the systems are constructed in such a way that the unstrained lattice constants of the constituent incommensurate monolayers are retained. We find strong interaction between the Gamma-point states in all TMD/TMD heterostructures, which can lead to an indirect gap. On the other hand, states near the K point remain as in the monolayers. When TMDs are paired with BN or graphene layers, the interaction around the Gamma-point is negligible, and the electronic structure resembles that of two independent monolayers. Calculations of optical properties of the MoS2/WS2 system show that, even when the valence-and conduction-band edges are located in different layers, the mixing of optical transitions is minimal, and the optical characteristics of the monolayers are largely retained in these heterostructures. The intensity of interlayer transitions is found to be negligibly small, a discouraging result for engineering the optical gap of TMDs by heterostructuring.