My schools never had stars, but in Junior High, there was a similar concept.
For how good of a student you are in class, the teacher would add stickers/colored squares to a 10x10 paper grid. Fill up the whole grid and you get a reward. Typical rewards would be snacks, cool pencils, and sometimes getting to play a video game on my teacher's Wii console.