Step 1: Properties of photons in different media.
When a photon enters a different medium, such as from air to glass, its velocity and wavelength change, but its energy and momentum remain constant. The energy of a photon depends on its frequency, and the frequency of the photon does not change when it enters the new medium.
Step 2: Conclusion.
Thus, the correct answer is (B) Energy.