* The Sun is Matter: The Sun is a giant ball of hot, ionized gas (mostly hydrogen and helium). Gas is absolutely a form of matter. It has mass, takes up space, and is made of atoms (or, in the Sun's case, mostly ionized particles).
* Sunlight is Energy: Sunlight is a form of electromagnetic radiation, specifically light. Light is a wave of energy, not matter. It doesn't have mass, and it doesn't take up space in the traditional sense.
Think of it this way:
* You can't put sunlight in a bucket. It's not a physical substance.
* You could (in theory) scoop up a tiny bit of the Sun's matter. It would be incredibly hot and dangerous, but it would have weight and volume.
The key takeaway: Matter is anything that has mass and takes up space. Sunlight has energy, but it's not made of particles, so it's not considered matter.