Since, arg $\frac{z_1}{z_2}=\frac{\pi}{2}$
$\Rightarrow \, \, \frac{z_1}{z_2}=cos\frac{\pi}{2}+ i sin \frac{\pi}{2}=i$
$\therefore \, \, \, \, \, \, \frac{z_1^n}{z_2^n}=(i)^n \, \Rightarrow i^n=1 \, \, \, \, \, \, \, \, \, \, \, \, \, [\because \, |z_2|=|z_1|=1] $
$\Rightarrow \, \, \, \, \, \, \, \, n=4k $
Alternate Solution
$Since ,\, \, \, arg \frac{z_2}{z_1}=\frac{\pi}{2}$
$\therefore \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \frac{z_2}{z_1}=\bigg|\frac{z_2}{z_1}\bigg|e^{i\frac{\pi}{2}}$
$\Rightarrow \, \, \, \, \, \frac{z_2}{z_1}=i \, \, \, \, \, \, \, \, \, \, \, \, \, [\because \, |z_1|=|z_2|=1] $
$\Rightarrow \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \bigg(\frac{z_2}{z_1}\bigg)^n=i^n$
$\therefore \, \, \, z_1 \, and \, \, z_2$ are nth roots of unity
$z_1^n=z_2^n=1 \, \Rightarrow \, \, \bigg(\frac{z_2}{z_1}\bigg)^n =1 \, \, \, \Rightarrow \, \, i^n=1$
$\Rightarrow \, \, \, \, \, $ n=4k, where k is an integer.