The coloured belts are awarded to students in recognition of training efforts and encourage the students to continue such endeavours in the future. Grading also help to establish seniority, the important Senpai/Kohai relationship, which in turn allows for the smooth running of functions and activities of the dojo.
Students should always remember that grading are a privilege, not a right. Just because you have been a member of a dojo for some time, are friends with the senior students and so on does not give you the right to do grading when YOU please. The privilege to participate in a grading for ANY level is earned through dedicated, regular attendance and determined training. The instructor has the last say as to whether you may participate in a grading or not. Do NOT take it for granted. No one is that good.
One of the worst practices one can adopt is simply turning up for training a few weeks before a grading to sharpen up a little, then expect the grading to fall into your hands. It is not that easy. Certainly, some students with talent can do this, but talent does not justify disregard for common courtesy. Such an attitude demonstrates a very fundamental misunderstanding of the purpose of the grading system. It is common courtesy, to the instructor and to one's fellow students, to participate in the activities of the dojo in a spirit of friendship and humility. In this way, the dojo grows stronger and one's personality is broadened.
Of course, if one is genuinely unable to attend training more than once or twice a week then that is a different story. Such situations should be discussed with the instructor. From experience though, most instructors will be able to tell you that genuine reasons for failure to attend class are few and far between.