That glow is mostly stolen. A gas planet shines because it redirects and reprocesses light from its parent star, not because it burns on its own, and the physics of that theft is far from gentle. High albedo, the fraction of light reflected, turns thick cloud decks of ammonia, water ice or methane into planetary mirrors that can bounce a large share of incoming photons straight back toward our telescopes, while darker rocky bodies simply swallow that energy.
More surprising is how gas helps, not hurts, the effect. Deep atmospheric pressure compresses hydrogen and helium, shaping layers with wildly different densities, and those gradients drive Rayleigh scattering that favors shorter wavelengths and gives the disk a bright, clean edge against space. Add in Mie scattering off cloud particles and you get a broadened halo that can briefly outshine background stars when the planet sweeps across them, a kind of moving spotlight carved from starlight itself.
The final trick is that the planet cheats with heat. Absorbed radiation warms the atmosphere, which then releases infrared thermal emission; to sensitive detectors, that glow stacks on top of reflected light, even though no sustained nuclear fusion occurs. So a world made almost entirely of gas can flare in a star field not because it is a small star in hiding, but because its atmosphere is an exquisitely tuned machine for catching, reshaping and throwing back someone else’s light.