The guitar came to Cuba with the Spaniards. According to EcuRed, people from every social sector play it, in punto, in almost every form of son and in song. The tres grew out of the Spanish guitar.
According to EcuRed, the guitar accompanies dance and song in most Cuban folk genres: punto cubano, almost every form of son (except changüí) and the various kinds of song. Its main task is harmony. Together with the laúd and the tres, which handle melody and improvisation, it forms the line-up of punto and son. When there are two guitars, one plays melody and counter-melody, and the other accompanies with chords and bass runs.
According to Wikipedia, the tres arose from early guitars around 1890 in Baracoa. In the classic son sexteto of the 1920s, guitar and tres stood side by side, with bongo, claves, maracas and double bass. See Tres.
The Trío Matamoros (1925) spread all the layers of son over three voices, two guitars and maracas. According to Wikipedia, Rafael Cueto plucked his strings instead of strumming: the guajeo on the treble strings and the tumbao on the bass strings.
According to Wikipedia, in the late 1930s Arsenio Rodríguez put the piano in his conjunto in place of the guitar. So the guitar left the front line of the dance band. In trova and bolero it remained the accompanist of the voice.