Visual signalling leaves no trace and can only be seen by those who you can see. Radio transmissions can be detected by sensors you don't know are present. This is useful for navies.
They're reasonably quick, reliable and transcend language barriers.
They also work well as a broadcast method - you can hoist Flag Alpha and every ship in visual range will know you that have a diver in the water and to use caution in your vicinity, you don't need to create excess chatter by announcing it on radio every 5 minutes.
Also, when you need a laugh during a long and boring watch you can get someone junior on the bridge to read out the ICS definition for Single Letter Signal Flag Zulu.