Boxing weight classes are a way of ensuring that boxers of similar size and weight are matched up.
While one can argue that a true champion would fight anyone, fighting within one's weight class makes for better fights.
Bigger boxers have more natural weight behind their punches. Heavyweights tend to inflict more knockouts but the fighters tend to be slower. Featherweights, on the other hand, are blindingly fast.
Dividing up boxing into weight classes helped to reduce the number of lop sided victories and the ability of boxers to pick on smaller opponents.
It is not uncommon for boxers to move into and out of weight classes. As they grow older, they could move from middleweight to light heavyweight in order to challenge themselves more or to take a title in two different weight classes. Nothing says one has to stay in one class for one's entire career. If one can add or lose the weight, one can fight in whatever class one wants.
Boxing weight classes vary depending on whether one is talking about professional boxing or amateur boxing. The below charts will give you the upper and lower limits for amateurs and professionals.
Charts courtesy of Wikipedia.