Coronavirus Fact-Check #6: Does wearing a mask do anything?

As of two days ago, Boris Johnson’s government announced it will henceforth be illegal to use public transportation in the UK, without wearing a mask.
But do masks actually do anything to prevent the spread of this disease? Or respiratory diseases in general?