A quaternion $q \in \mathbb{H}$ can be write like
$$q = a_0 + a_1 i + a_2j + a_3 k; ~ a_\iota \in \mathbb{R}$$
, where:
$$i^2 = j^2 = k^2 = ijk = -1$$ $$ij = -ji = k$$ $$jk = -kj = i$$ $$ki= -ik = j$$
But, when we calculate
$$i^j = \left( e^{\frac{\pi}{2}i} \right)^j = e^{\frac{\pi}{2}ij} = e^{\frac{\pi}{2}k} = k$$
My question: is this right? If yes, why $i^j = ij = k$? Is there a geometric/algebraic meaning of this?
According to this document, quaternion powers can be defined.
Using the notation $\mathbf q = s + \mathbf v$ where $s\in\mathbb R$ and $\mathbf v\in\operatorname{span}\{i,j,k\}$ we define $$ \exp(\mathbf q) = \exp(s) \left( \cos|\mathbf v| + \frac{\mathbf v}{|\mathbf v|}\sin|\mathbf v| \right) \\ \ln(\mathbf q) = \ln|\mathbf q| + \frac{\mathbf v}{|\mathbf v|} \arccos\frac{s}{|\mathbf q|} \\ $$ and powers by $$ \mathbf q^{\mathbf p} = \exp(\ln(\mathbf q) \mathbf p). $$
For $\mathbf q=i$ we get $$ \ln(\mathbf q) = \ln|\mathbf q| + \frac{\mathbf v}{|\mathbf v|} \arccos\frac{s}{|\mathbf q|} = \ln|i| + \frac{i}{|i|} \arccos\frac{0}{|i|} = i\frac{\pi}{2} $$ which is not surprising since we know from the complex numbers that $e^{i\frac{\pi}{2}} = i.$
Thus, with $\mathbf p=j,$ we get $$ \ln(\mathbf q)\mathbf p = i\frac{\pi}{2} j = \frac{\pi}{2} k $$ which then gives us $$ \mathbf q^{\mathbf p} = \exp(\ln(\mathbf q)\mathbf p) = \exp(\frac{\pi}{2}k) = \exp(0) \left( \cos|\frac{\pi}{2}k| + \frac{\frac{\pi}{2}k}{|\frac{\pi}{2}k|} \sin|\frac{\pi}{2}k| \right) = 1 \cdot (0 + k\cdot 1) = k. $$
So your calculation is correct, but I can unfortunately not give you any interpretation of this.