I have a hard time with this too. My daughter doesn't sleep well, so she often wakes up feeling grumpy and unwell. It's hard for me to tell if she's actually hurting, or just tired. If she doesn't feel like going even after eating breakfast and waking up a bit, I will let her stay home for an hour, and then encourage her to try school after that, letting her know that she can call me to pick her up if she really doesn't feel good. Like mlp, I find that school generally is a good distraction for her, as long as she's not feeling too crummy.
Looking at her attendance, so far in the first month of school, she's missed her first period class on 3 days, missed 2 full days, and come home early once. So not great attendance, but she hasn't had trouble keeping up with things so far. (She's in middle school--high school would probably be a different story.)
Mixed into all the decision-making this year is some angst left over from last year before her diagnosis, when she would complain of pain frequently, and we didn't take it seriously enough until she was quite ill.
It's hard to find the right balance sometimes! You don't want to send them when they're so sick that school is actually a stress on them. But then if they miss too much, keeping up with things is also stressful. We had to take E out of school last year for a semester and homeschool her, to avoid that dilemma, and it was a really good choice for her at that point.