So a few things to sort out. First of all, no nothing to do with the squeeze theorem. What we can do with the squeeze theorem is say that when we can squeeze a limit between two other limits (or a constant and a limit) whose values we know coincide, then the limit we "squeezed" must agree with that as well.
As far as plugging in $+ \infty$ and $-\infty$ we never do that. We only take a limit going to a place. $+ \infty$ or $-\infty$ for example but not both.
What I think you're asking is "how do I know when I have to verify the limit from both the right and the left?" And the answer is, essentially, always. It's just that much of the time our function behaves nicely enough that it's very clear the left and right limits agree. When dealing with limits at $\pm \infty$ then there is only ever a one sided limit. How do you approach $+ \infty$ from the right for example? Well, you can't...
So for your example I'll abuse notation a bit and we have
$$\lim_{X \to \infty} \frac{e^x}{e^x+1}=\lim_{x \to \infty} \frac{1}{1+\frac{1}{e^x}}=\frac{1}{1+\frac{1}{e^\infty}}=\frac{1}{1+\frac{1}{\infty}}=\frac{1}{1+0}=1$$
$$\lim_{X \to -\infty} \frac{e^x}{e^x+1}=\lim_{x \to -\infty} \frac{1}{1+\frac{1}{e^x}}=\frac{1}{1+\frac{1}{e^{-\infty}}}=\frac{1}{1+e^\infty}=\frac{1}{1+\infty}=0$$