Titanium nitride (TiN) thin films were prepared by means of reactive DC sputtering on quartz and sapphire substrates. Structural, electrical and optical effects of deposition parameters such as thickness, substrate temperature, substrate bias voltage were studied. The effect of substrate temperature variations in the 100-300degreesC range and substrate bias voltage variations in the 0-200 V DC range for 45-180 nm thick TiN films were investigated. Temperature-ependent electrical resistivity in the 100-350K range and optical transmission in the 300-1500 nm range were measured for the samples. In addition, structural and morphological properties were studied by means of XRD and STM techniques. The smoothest surface and the lowest electrical resistivity was recorded for the optimal samples that were biased at about V-s= -120V DC. Unbiased films exhibited a narrow optical transmission window between 300 and 600 nm. However, the transmission became much greater with increasing bias voltage for the same substrate temperature. Furthermore, it was found that lower substrate temperatures produced optically more transparent films. Application of single layers of MgF2 antireflecting coating on optimally prepared TiN films helped increase the optical transmission in the visible region to more than 40% for 45 nm thick samples.