My solution:It is fairly straightforward graphically but I just want to ensure if it is rigorous enough.
Suppose $X$ is a discrete metric space and $f$ be any function from $X$ to $Y$ where $Y$ is any other metric space. Let $d_{x}$ and $d_{y}$ denote the metrics in metric spaces $X$ and $Y$ respectively.
If $p,q\in X, p=q$, then $d_{x}(p,q)=0<\delta$ for any $\delta>0$. If $p,q\in X, p\neq q$, then $d_{x}(p,q)=1$.
Choosing $\delta=2$, we have $d_{y}(f(p),f(q))<\epsilon$, $\forall \epsilon>0$.
So $\forall \epsilon>0,$ we have $\delta>2$, such that $d_{x}(p,q)<\delta$ implies $d_{y}(f(p),f(q))<\epsilon$.
So, any function from a discrete metric space to any other metric space is uniformly continuous.
Please suggest if it is correct and rigorous enough.
Hints:
For any $\epsilon>0$, you can choose that $\delta=\frac12$, then for any $x,y \in X$, if $|x-y|<\delta$, then $x=y$, and hence $|f(x)-f(y)|=0<\epsilon$, which shows that $f(x)$ is uniformly continuous.