Isomorphisms in terms of pullbacks
Well, the mentioned pullbacks do exist in any category, and they are isomorphic to $X$ and $Y$, respectively:
$f\times_Y 1_Y\,\cong X\ \ $ and $\ \ 1_X\times_X g\,\cong Y$,
so, we indeed have a statement in general: $f\times_Y1_Y\cong 1_X\times_Xg\ \iff\ X\cong Y$, though it sounds somewhat trivial.
(In full generality I'm afraid we cannot expect more, as pullbacks are unique only up to isomorphism, so we can hardly interpret strict equations.)
We can reformulate your pullback a little: $f:X\to Y,g:Y\to X$ are mutual inverses just if $Y$ is a pullback $f\times 1_Y$ with upper legs of the pullback square $g$ and $1_Y$ or, equivalently, if $X$ is a pullback $g\times 1_X$ with upper legs $f$ and $1_X$. This is still pretty vacuous, but at least all the maps in the diagram are determined.
Here's a somewhat analogous situation in which there's a less empty result: a map $f:X\to Y$ is a monomorphism if and only if $X$ is a pullback $f\times_Y f$ with the upper legs of the pullback square both $1_X$. In the same way $f$ is an epimorphism if and only if the dual square is a pushout. So you can get that $f$ is mono and epi by examining two squares, though they're not both pullbacks. In many (but not all!) categories, for instance abelian categories and toposes, that's enough to show $f$ is an isomorphism.