Is it preferable to buy two 8GB or one 16GB for iMac 27" 2017 memory upgrade? I have 16GB of RAM installed on my iMac 27" 5K i7 2017 (2 x 8GB).

There are 4 slots in total and I would like to add another 16GB. 

I don't know if it's best to buy 2 x 8GB or 1 x 16GB?
Your model, like most Macs, supports memory interleaving, which means that paired memory may work better than single modules.

However, Apple's own guidelines for installing memory in iMacs make no mention of this, and the real-world effect may be minimal, (as mentioned in comments)