$$ab \in H \iff a \equiv b \pmod H$$
It abides by reflexivity, symmetry and transitivity.
Proof of reflexivity: (taken from this site)
$H \subset G \\ a,e \in G \\ e = aa^{-1} \in H$
Proof of symmetry:
$ab \in H \\ (ab)^2 \in H \\ a^{-1}(ab)^2b^{-1} = a^{-1}(abab)b^{-1} \in H = (a^{-1}a)ba(bb^{-1}) \in H = ebae \in H = ba \in H$
Proof of transitivity:
$ab, bc \in H \\ abbc \in H \\ abb^{-1}b^{-1}bc \in H = aeec \in H = ac \in H$
However, I was told in this post that if $ab$ is in a group, it does not mean that $a$ is equivalent to $b$ in that group. However, it seems to me that the three criteria for equivalence has been met. What is correct?
EDIT:
Apparently, for the equivalence relation between $a$ and $b$ to be reflexive, both $a$ and $b$ must be equivalent to themselves (respectively) within the sub-group (if I understand correctly). Now, for something to be equivalent to itself is easy, because it is equal to itself, and equality is an equivalence. So, isn't the relation between $a$ and $b$ reflexive?
Consider $\{[0]_3\}=H\le G=\Bbb Z_3$. In order for your relation, call it $\sim$, to be an equivalence relation, we require $a\sim a$ for all $a\in G$ (reflexivity); but this means $a+_3a=2a\in H$ for all $a\in G$, and yet
$$\begin{align} [1]_3+_3[1]_3&=[1+1]_3\\ &=[2]_3\\ &\neq [0]_3, \end{align}$$
where
$$[x]_3=\{ y\in\Bbb Z\, :\, 3\mid x-y\}.$$
What is an equivalence relation, though, for a general group $G$, is
$$a\sim_Hb\iff ab^{-1}\in H,$$
for all $a,b\in G$ and $H\le G$.