The balloon has air filled in it. The balloon when kept in sun gets heated and the air inside it also gets heated. The molecules of air get energy, and vibrate faster thereby exerting large force on the walls of the balloon. Due to this expansion of gases the balloon bursts.