MY understanding ( and its not an area of data protection I am certain of) is that they would either have to gain your permission to do so or have either a court order or similar legal request to do so
The Nursing and midwifery council who I have to register with as a condition of my employment obviously have my address. They sold this ( along with half a million other peoples addresses) to a marketing company. They had put it in their annual briefing that they were going to do this and asked folk to opt out. I did not see this briefing. The information commissioner took a very dim view of this. Forced them to stop the practice immediately. Forced the marketing company to destroy the list of names, forced the NMC to change their procedures and made the head of the NMC apologise to me. This was as a result of my complaint to the information commissioner
the basic principle is that you can only use information given to you for the purposes that you gave them the information and that an opt out in using info in other ways is not sufficient – it has to be an opt in and not a pre ticked check box hidden in small print.