Magnesium ribbon should be cleaned before burning to remove the thin layer of magnesium oxide that forms on its surface due to exposure to air. This oxide layer is stable and prevents the magnesium from reacting efficiently with oxygen during burning. By cleaning the ribbon, typically by rubbing it with sandpaper, you remove this oxide layer, allowing the magnesium to burn more readily and completely, producing a bright white flame and forming magnesium oxide.