You could go to school while having pink eye but you'd likely be sent home by the school nurse once the school nurse finds out about your pink eye.
Pink Eye is very contagious and can spread from person to person quickly so it's best to stay home until the pink eye is no longer contagious.
You should treat the pink eye with antibiotics and not return to school until after 24 to 48 hours after you've been treated for the pink eye.
Pink eye is usually no longer contagious after 24 to 48 hours once you've treated pink eye with antibiotics.