Choose a homotopy equivalence $U(2)\simeq \Omega BU(2)$ to use as an identification and let $g:S^3\rightarrow U(2)\simeq \Omega BU(2)$ represent a homotopy class in $\pi_3U(2)$. Then the $U(2)$-bundle $E\rightarrow S^4$ corresponding to $g$ is classified by the map $\tilde{g}:S^4\rightarrow BU(2)$ which is adjoint to $g$. Then $g$ is homotopic to the composite
$g:S^3\xrightarrow{E}\Omega S^4\xrightarrow{\Omega\tilde{g}}\Omega BU(2)\xrightarrow{\simeq} U(2)$
where $E:S^3\rightarrow\Omega\Sigma S^3$ is the suspension map.
Now since the fibration $SU(2)\rightarrow U(2)\xrightarrow{det}S^1$ splits and there is a homotopy equivalence $U(2)\simeq S^1\times S^3$, there is a spherical generator $x_3\in H^3U(2)=\mathbb{Z}$ in the sense that
$g^*x_3=\text{deg}(g)\cdot s_3\in H^3S^3$
where $s_3$ generates $H^3S^3=\mathbb{Z}$. Moreover we may assume that $x_3$ is the cohomology suspension of the second Chern class
$x_3=\sigma (c_2)$
Now all of this together gives us a second equation for $g^*x_3$
$g^*x_3=g^*\sigma (c_2)=E^*(\Omega\tilde{g})^*\sigma (c_2)=E^*\sigma (\tilde{g}^*c_2)=\text{deg}(\tilde{g})\cdot E^*\sigma(s_4)=\text{deg}(\tilde{g})\cdot s_3$
Finally combine the two expressions for $g^*x_3$ to get
$g^*x_3=\text{deg}(g)\cdot s_3=\text{deg}(\tilde{g})\cdot s_3$
and conclude that $\text{deg}(g)=\text{deg}(\tilde{g})$. That is, in the wording of your question, "the corresponding second Chern class $c_2(E)$ equals $g$".