This page contains information regarding Star Trek: Short Treks, and thus may contain spoilers.
Gilbert and Sullivan were a Human 19th century musical duo of composers – William S. Gilbert and Arthur S. Sullivan – from England. They wrote operas that satirized the British society and politics of the Victorian era. Two of their many works were HMS Pinafore and The Pirates of Penzance.
In 2368, Beverly Crusher encouraged Geordi La Forge to sing the role of the Major-General in The Pirates of Penzance. La Forge was reluctant, but Crusher convinced him to attempt to sing "I Am the Very Model of a Modern Major-General". However, his rendition of the patter-song was interrupted by the USS Enterprise-D's collision with a quantum filament. (TNG: "Disaster")
In 2375, Lt. Commander Data had been preparing for a performance of HMS Pinafore before he was temporarily assigned to the survey team studying the Ba'ku. Captain Picard sang "A British Tar" with the malfunctioning android to distract him long enough for Lt. Commander Worf to subdue him. Although Worf claimed not to be familiar with Gilbert and Sullivan (having mistaken them for crewmembers of the USS Enterprise-E), he was able to join the song in accurate harmony with Picard. (Star Trek: Insurrection)
The Major-General's song was included in ST: "Q&A" because Rebecca Romijn, who plays Number One, enjoys singing Gilbert and Sullivan songs. (Inside Short Treks: How Rebecca Romijn Helped Sneak Gilbert and Sullivan into Star Trek at CBS All Access)