The Simple rule which normally dominates the selection of vector group of a transformer is the network where it is to be installed. Normally there are three networks: Generation, Transmission and Distribution. The inherent advantage of the D connection is prevention of zero sequence and harmonics to enter in the network.
Now starting from the Generation. The generators are connected in the Y. Now from the Generators the Unit Transformers are used to transmit the power. The preferable connection for the Unit Transformers are YNd i.e Low voltage side (Generator Side is connected in Delta and High Voltage Side Transmission side is connected on Y) the benefit of this vector group is that it prevents the harmonics or zero sequence fault current of Transmission Lines to enter in Generation Network.
From Transmission Network to the Distribution Network. The preferable Connection is Dyn. (Transmission side in D and Distribution Side in Y. the reason is same as explained above.) Even in the distribution networks. The vector groups for the transformers are Dyn. But here besides the above benefits, it has an extra advantage that we can supply the single phase loads from our distributors.
As regards the other two types i.e. Yy or Dd, the YNyn connections are used seldom, and not very famous type of connections. Normally it is used as Yya0 i.e. Auto-Transformer connections in Power networks. The auto-transformers are very extensively used in the Transmission networks where we enter from EHV to sub-transmission voltage level as the network is same so no isolation of the network is required and it also save the cost and reduces the size of the transformer.
Dd connections are used in special purpose transformers. The most common use of this type of connections is in Rectifier / Converter Transformers.