In fact, the general relativity states that the energy $ \varepsilon $ of the photon, subjected to a gravitational field generated by a massive object, is an invariant all along its geodesic path
$ \Rightarrow $ the energy of the light traveling upward in the earth’s gravitational field does not change.
However, the measure $ E $ of its energy (and of its frequency) done by a stationary observer depend on his location, and when the photon is emitted in a radial direction, with the Schwarzschild metric, it can be written as:
$$ E = -\frac{c}{\sqrt{1-\frac{2GM}{c^2r}}}\vec{ξ(0)}.\vec{p} $$
with $ r $ radial coordinate of the observer, $ \vec{ξ(0)} $ vector of Killing and $ \vec{p} $ four-momentum of the photon.
Along a light geodesic the quantity $ \vec{ξ(0)}.\vec{p} $ is maintained, then you can write for the emission and for the reception of the photon $ (\vec{ξ(0)}.\vec{p})_{em}=(\vec{ξ(0)}.\vec{p})_{rec} $ which means:
$$ E_{rec}=\sqrt{\frac{1-\frac{2GM}{c^2r_{em}}}{1-\frac{2GM}{c^2r_{rec}}}}E_{em} $$
Thus, because $ E=hc\ \nu $ with $ \nu $ frequency of the photon, you have:
$$ \frac{E_{rec}}{E_{em}}=\frac{\nu_{rec}}{\nu_{em}}=\sqrt{\frac{1-\frac{2GM}{c^2r_{em}}}{1-\frac{2GM}{c^2r_{rec}}}}\ \ \ \ \ [A] $$
This shows that energy or frequency on receiving the photon change with respect to its energy or frequency of emission.
$ [1] $ answer to question $ 1 $: if the photon is emitted from the surface of the Earth and if the observer who receives it is at a very great distance from the Earth, $ [A] $ leads to:
$$ \frac{E_{rec}}{E_{em}}=\frac{\nu_{rec}}{\nu_{em}}\simeq\sqrt{1-\frac{2GM_{Earth}}{c^2R_{Earth}}} $$
If my numerical calculation is right, you have then:
$$ \frac{E_{\infty}}{E_{Earth}}=\frac{\nu_{\infty}}{\nu_{Earth}}\simeq 99.56\ \% $$
$ [2] $ answer to question $ [2] $: if we assume that a photon coming from the sun can be emitted "from the core", its energy or frequency measured by an observer on Earth will be lower than the energy or frequency of a photon coming from the surface of the Sun and measured by the same observer (by applying $ [A] $ with $ r_{em} $ core $ < r_{em} $ surface and assuming that the energy $ \varepsilon $ of the photons is the same).
Please note that this question/answer is purely theoretical since a photon coming from the core of the Sun can take thousands of years to reach the surface of the Sun from where it is emitted into space and travels to Earth.
At the end, the equations written above are a first look assuming that the Earth or the Sun are spherical and do not rotate on their axis with respect to the observer (Schwarzschild metric).
Hoping to have answered your questions,
Best regards.