Find the time in terms of the y component of the velocity at the beginning:
v_{y}  =  v_{0y}-gt\\ 0  =  v_{0y}-gt\\ t  =  \frac{v_{0y}}{g}
Now use this time to find the highest point:\begin{eqnarray*}
y  =  v_{0y}t-\frac{1}{2}gt^{2}\\ y_{max}  =  v_{0y}\left(\frac{v_{0y}}{g}\right)-\frac{1}{2}g\left(\frac{v_{0y}}{g}\right)^{2}\\  =  \frac{v_{0y}^{2}}{2g}.
We know v_{0y} because it is just the part of the velocity projected
on the y axis and so: