Your \highlight command doesn't work in superscripts because (1) the equation in the \colorbox doesn't know it's supposed to be typeset in \scriptstyle and (2) because of the \displaystyle in its definition explicitly telling TeX to typeset #1 in display style (using a full size font and things like large summation/integral symbols).
This is pretty much exactly what the \mathpalette command is designed to solve.
A detailed description of how \mathpalette works can be found here.
Here is a simple re-implementation that uses `\mathpalette.
(An improved version may be found below)
\documentclass{article}
\usepackage{xcolor}
\newcommand{\highlight}[1]{\mathpalette\highlightwithstyle{#1}}
\newcommand{\highlightwithstyle}[2]{\colorbox{red!50}{$#1#2$}}
\begin{document}
\[
a^{\highlight{\alpha}} + \highlight{\sum}
\]
\end{document}

What \highlight{\alpha} now does is expand to \highlightwithstyle{<current math style>}{\alpha}, where <current math style> is either \displaystyle, \textstyle, \scriptstyle or \scriptscriptstyle (whichever is appropriate). This in turn turns into
\colorbox{red!50}{$\scriptstyle\alpha$}
when used in a super-/subscript, and into
\colorbox{red!50}{$\displaystyle\alpha$}
when used in the main display equation etc. (The other two cases are \textstyle for inline equations and \scriptscriptstyle for nested super-/subscripts.)
Addendum (improved version)
Here is another version of the same command that creates a slightly tighter box and doesn't in most (but not all) circumstances affect the spacing of your equation.
It also lets you specify a colour.
\documentclass{article}
\usepackage{xcolor}
\newcommand{\highlight}[2][red!50]{\mathpalette{\highlightwithstyle[#1]}{#2}}
\newcommand{\highlightwithstyle}[3][red!50]{
\begingroup %% <- limit scope of \box0 and \fboxsep assignment
\sbox0{$\mathsurround 0pt #2#3$}% %% <- typeset content in box 0
\setlength{\fboxsep}{.5pt} %% <- set (smaller) framebox margins
\sbox2{\hspace{-.5pt}% %% <- create box 2, undo margin
\colorbox{#1}{\usebox0}% %% <- print the contents of box 0 in a \colorbox
}%
\dp2=\dp0 \ht2=\ht0 \wd2=\wd0 %% <- set dimensions of box 2 to match box 0
\box2 %% <- print box 2
\endgroup %% <- revert old definitions of the boxes and \fboxsep
}
\begin{document}
\[
a^{\highlight{\alpha}} + \highlight{\sum_{k=1}^\infty \frac{\fbox{1}}{\color{blue}k!}} + \frac{\highlight[green]{x}}{2}
\]
\[
a^{\alpha} + \sum_{k=1}^\infty \frac{\fbox{1}}{\color{blue}k!} + \frac{x}{2}
\]
\end{document}

I've tried to explain what each of these lines do in the comments, except for \mathsurround.
Setting \mathsurround to 0pt does nothing here, but it would matter if your document uses non-standard spacing around inline equations (which is unlikely).
\scriptsize\alphawork for you? – May 08 '20 at 12:06$a^{\highlight{\scriptsize\alpha}}does not work – Jason Adhinarta May 08 '20 at 12:11$a^{\scriptsize\highlight{\alpha}}$, maybe? It works here. – May 08 '20 at 12:12