I understand that it goes in the other direction, that is, if $A=B$, then $A$ if and only if $B$ is also true.
(Just do a proof by contradiction, given $A=B$ assume $\lnot(A\leftrightarrow B)$, then $\lnot(A\leftrightarrow A)$, so the assumption was wrong and $A=B$ implies $A\leftrightarrow B$.)
However I want to know under what conditions does the implication go the other way? Is there any general set of requirements I can look for, to know that it will hold in the reverse case? Under what special circumstances can I conclude $A=B$ when I already know $A\leftrightarrow B$?
You are free to interpret $A$ and $B$ as whatever object you wish. If it helps, they can be restricted to a certain type to answer the question.
I found an answer to the question by looking into the propositional extensionality that @Daniel Schepler linked in a comment. The trick is to take $A$ and $B$ as propositions in the case of $A\leftrightarrow B$, and as names for propositions (denoted as $'A'$ and $'B'$) in the case of $'A'='B'$. Then the implication, if $A\leftrightarrow B$ then $'A'='B'$ holds.
Reference: https://ncatlab.org/nlab/show/propositional+extensionality