Every upper triangular matrix with distinct elements on the diagonal is diagonalizable, because
$$\det(A-\lambda I)=\prod_{i=1}^n (a_{ii}-\lambda)$$
with $a_{ii}\neq a_{jj}$ for $i\neq j$, so every eigenvalue has multiplicity $1$.
The converse is not true. Take $A=I$. Then $A$ is diagonalized, but not with distinct values on the diagonal.
The method posted in the comment above gives an easy answer: if
$A = S D S^{-1}$,
then
$A^{-1} = (SDS^{-1})^{-1} = (S^{-1})^{-1} D^{-1} S^{-1} = S D^{-1} S^{-1}$.
Since $A$ and $S$ are invertible, so is $D = \operatorname{diag}(\lambda_1,\ldots,\lambda_n)$, and then $D^{-1} = \operatorname{diag}(\lambda_1^{-1},\ldots,\lambda_n^{-1})$. So $A^{-1}$ is diagonalizable. The other direction is, according to taste, either entirely similar or actually deduced from what we already did by plugging in $A^{-1}$ in place of $A$.
However, I want to answer the question in a slightly less easy way but which gives more. The calculation actually shows that the same matrix $S$ diagonalizes both $A$ and $A^{-1}$. (One says that $A$ and $A^{-1}$ are simultaneously diagonalizable.) What does that mean? A matrix $S$ diagonalizes a matrix $A$ if and only if the columns of $S$ are eigenvectors for $A$, so we're seeing that $A$ and $A^{-1}$ admit a common basis of eigenvectors. But that suggests an even stronger fact.
Proposition: Let $A$ be any invertible matrix.
a) A nonzero vector $v \in V$ is an eigenvector for $A$ if and only if it is an eigenvector for $A^{-1}$.
b) More precisely, zero is not an eigenvalue of either $A$ or $A^{-1}$ because they are invertible, and for any nonzero $\lambda$, the $\lambda$-eigenspace for $A$ is the $\lambda^{-1}$-eigenspace for $A^{-1}$.
In particular the sum of the dimensions of the eigenspaces for $A$ is always equal to the sum of the dimensions of the eigenspaces for $A^{-1}$. The case where these dimensions sum to $n$ recovers the case asked by the OP.
Best Answer
Let's denote $\lambda$ the entry on the diagonal of the triangular matrix $A$ then the characteristic polynomial $$\chi_A(x)=\det(xI_n-A)=(x-\lambda)^n$$ so $\lambda$ is the only eigenvalue of $A$ hence if $A$ is diagonalizable then it's similar to $\lambda I_n$ so $A=\lambda I_n$. The only if case is trivial.