Y is required if you need a true neutral.
Y is usually required if you need to ground the system. Corner-grounded D and midpoint-D grounding are also sometimes used, but rarely -- there's issues there with overvoltages, problems with connections of single-phase loads, etc.
Most motors don't need neutrals, so D distribution systems are acceptable. Y secondaries are still often used to feed the D distribution systems since many systems are required to be grounded.
At least one winding, either one (primary or secondary) is usually specified delta in most transformers, that gives a place for triplen harmonics to circulate (isolating them from the upstream source system).
However, Yy is also sometimes used by utilities -- I couldn't tell you why, maybe someone else can.
Hope this helps.