Yes. Rapidly rubbing metal with sandpaper generates friction heat, tearing off microscopic metal particles that oxidize incandescently—visible as sparks.
Sparks ignite flammables, cause burns, and can start fires. Wear eye protection; avoid near fuels, solvents, dust, or flammable vapors. This is essentially primitive fire-making—treat it with respect.