I don't think there is a clear rule like Naoki-san wrote.
But, roughly speaking, ズ(ず) is used much more than ヅ(づ).
There are basically three situations as follows:
case#1 ず or づ comes first: ex)ずいぶん、ずっと、づけどん(づけ丼)
case#2 ずor づ comes in the middle as an euphonic change of unvoiced to voiced sound(連濁(れんだく))
ex)すず、すずしい、すずき、つづき、つづら
case#3 ず or づ comes at the end: ex) くず、あいづ(会津)
Now that づ mostly exists in case#2.
づ in case#1 rarely exists and づ in case#3 mostly exists in names of places, which doesn't happen a lot.
(About づ in case#1, I can only think of づけどん, which is pickled raw fish on rice.)
I hope this helps you even a little.