The molecules in the air are always creating pressure. Countless molecules collide into everything every second, creating a constant force. Before the air in the balloon is heated, the molecules inside are creating as much pressure as the molecules outside, meaning that the balloon stays at equilibrium and neither expands nor contracts. When they get heated, however, the inside molecules start moving with more force. They create more pressure, causing the balloon to expand outward until the pressure equalizes.
Gamma rays are heavily produced in the core of the sun but are diluted before they reach the surface (Z). And the surface is the only thing the human eye can see (X).