The violin came into Cuban popular music through the charanga, where violins and flute give danzón and cha-cha-chá their elegant sound. In timba it is not a core instrument, but it still turns up as a colour and a nod to that charanga tradition.
Timba song with its own violin solo part:
According to Wikipedia, the charanga francesa came about when the upper classes began dancing indoors: flutes and strings replaced the brass and woodwinds of the orquesta típica. From the 1940s charangas made Cuban dance music popular, with Antonio Arcaño y sus Maravillas as a well-known example. In that orchestra, in 1948, played violinist Enrique Jorrín, later credited as the inventor of the cha-cha-chá.
The violins play not only melody but also guajeos, repeating figures like those of the tres and the piano. According to Wikipedia, Orquesta Aragón set its own violin guajeo against the piano in No me molesto (1955).