Let $W$ be the complement of a compact set $K$ in $\mathbb{R}^{n}$, and $u$ a subharmonic function on $W$. Can we find, under some conditions, a function $\tilde{u}$ that is subharmonic on $W\cup\{\infty\}$ and coincides with $u$ on $W$?
(Too long for a comment.)
What exactly is your definition of a (sub)harmonic function on $W \cup \{\infty\}$?
You can always project your function to the unit $n$sphere using the stereographic projection: $$\mathbb{R}^n \ni x \mapsto \phi(x) = p + 2 x'  p^{2} (x'p) \in \mathbb{S}^n ,$$ where $x' = (x_1, \ldots, x_n, 0) \in \mathbb{R}^{n+1}$, $p = (0, \ldots, 0, 1) \in \mathbb{R}^{n+1}$ and $\mathbb{S}^n = \{x \in \mathbb{R}^{n+1} : x = 1\}$. More precisely, the function $$v(x) = x'  p^{2  n} u(\phi^{1}(x))$$ is subharmonic on $\phi(W) \subseteq \mathbb{S}^n$. (This is a close relative of the Kelvin transformation.)
With this identification, you can treat $\infty$ just as every other point of $\mathbb{R}^n$ (or $\mathbb{S}^n$). The problem is that the value of (the extension of) $v$ at $p$ is not the same as the hypothetical value of $u$ at infinity; in fact, $v(p) = \lim_{x \to \infty} x^{n2} u(x)$.
I do not see any other reasonable notion of (sub)harmonicity on $W \cup \{\infty\}$. One could naively try to require that $u(\infty)$ is equal to (or does not exceed) the average of $u$ over an arbitrary sphere which contains $\mathbb{R}^n \setminus W$ in its interior. But this definition is not consistent: for example, the only harmonic functions in $W \cup \{\infty\}$ would be constants.
Edited: After reading another question by M. Rahmat, I realised that the last paragraph of my answer was wrong. What I called a "naive" approach actually works in dimensions $n \geqslant 2$, and it was an idea developed by Brelot in 1940s; see [M. Brelot. Sur le rôle du point à l'infini dans la théorie des fonctions harmoniques. Ann. Sci. ́Ecole Norm. Sup., 61:301–332, 1944].

2$\begingroup$ The situation is special when $n=2$. Then $\infty$ can be treated as any other point, and removable singularity theorem is applicable. $\endgroup$ – Alexandre Eremenko Feb 1 at 12:25