Given the angle $\theta$, there are 4 possible scenarios (ignoring the cases when $\theta$ is a multiple of $\frac{\pi}{2}$ and $\pi$):
\begin{eqnarray}
\frac{\pi}{2} < \theta < 0 \\
\pi < \theta < \frac{\pi}{2} \\
\frac{3\pi}{2}< \theta < \pi \\
2\pi < \theta < \frac{3\pi}{2} \\
\end{eqnarray}
These represent the quadrant in which $\theta$ resides. Quadrants I,II,III and IV respectively.
Also, imagine a point $P$ which lines on the line that creates an angle $\theta$ moving in the anti-clockwise manner. The general coordinates of point $P$ are $(x,y)$. Let $OP$ be the length of the aforementioned line. Which is always positive.
1) Given that $\theta$ is in I quadrant:
The coordinates of $P$ are $(x,y)$, hence $\sin(\theta) = \frac{y}{OP}$ and $\cos(\theta) = \frac{x}{OP}$, i.e. $\tan(\theta) = \frac{y}{x}$, $\tan(\theta) \equiv \frac{\sin(\theta)}{\cos(\theta)}$. Identity holds.
2) Given that $\theta$ is in II quadrant:
The coordinates of $P$ are $(-x,y)$, hence $\sin(\theta) = \frac{y}{OP}$ and $\cos(\theta) = \frac{-x}{OP}$, i.e. $\tan(\theta) = \frac{y}{-x}$, $-\tan(\theta) \equiv -\frac{\sin(\theta)}{\cos(\theta)}$. Identity holds.
Or simply multiplying by $-1$ gives $\tan(\theta) \equiv \frac{\sin(\theta)}{\cos(\theta)}$.
3) Given that $\theta$ is in III quadrant:
The coordinates of $P$ are $(-x,-y)$, hence $\sin(\theta) = \frac{-y}{OP}$ and $\cos(\theta) = \frac{-x}{OP}$, i.e. $\tan(\theta) = \frac{-y}{-x}$, $\tan(\theta) \equiv \frac{\sin(\theta)}{\cos(\theta)}$. Identity holds.
4) Given that $\theta$ is in IV quadrant:
The coordinates of $P$ are $(x,-y)$, hence $\sin(\theta) = \frac{-y}{OP}$ and $\cos(\theta) = \frac{x}{OP}$, i.e. $\tan(\theta) = \frac{-y}{x}$, $-\tan(\theta) \equiv -\frac{\sin(\theta)}{\cos(\theta)}$. Identity holds.
Or simply multiplying by $-1$ gives $\tan(\theta) \equiv \frac{\sin(\theta)}{\cos(\theta)}$.