My school won’t let me: (examples: walk at graduation, play sports, go to prom, etc.) because I got in trouble. Can they do that?

Yes. Decisions regarding all extracurricular activities are entirely within the discretion of the school and school district. While school districts cannot exclude students from these activities for discriminatory reasons, it is completely allowable for a district to exclude students for reasons related to discipline or academic performance.