In order to analyze the technique of laser annealing of titanium dioxide films on sapphire substrates and to optimize the film properties, a thermomechanical model of this technique has been considered. The model allowed us to monitor and vary the values of thermoelastic stresses in the film-substrate structures caused by changes of film annealing technological parameters such as the laser power, the film thickness, the pulse duration, the speed of laser emission, etc. The temperature field under the laser beam was simulated and then the stresses were analyzed using the thermomechanical finite element model. The simulation results showed an important role of the TiO2 film-to-substrate thickness ratio. The optimal combination of technological parameters was selected to prevent formation of cracks and other defects in the films.