First you should consider whether the raw data itself should be capitalized too. If you find yourself ucfirst-ing it everywhere then it should probably be like that to begin with.
Anyway, three places to do it for three different reasons:
1. Do it in the model if the data should be capitalized to begin with. Basically what I said above.
2. Do it in the controller if there's some special logic that depends on the right letter case for the strings. I can't really think of any situation where you'd do it here but I threw this in for completeness. See also #3 because the line between controller and view is very much open to interpretation and different people will tell you different places to draw that line.
3. If the capitalization is purely cosmetic and you don't want to change the underlying data
to fit, putting it in the view is the best place. In my opinion: the view is where the capitalized version is used so that's where the transformation should take place. Other people will say that the view should have, like, zero logic in it at all and that the controller should do all the work preparing the data for presentation. (And other people will say you need a layer for business and/or view models and that's
where the capitalizing should go.)
Another way to look at it is what kind of code the controller will use.
#1. put it in the model if you would write code like
$category = ucwords($model->category);
// ignores the original value, ucfirst()s it immediately
#3. put it in the view (or controller) if you would write code like
$category = $model->category;
$this->view->category = ucwords($category);
// you used $category as it was but passed the capitalized version to the view
#2. put it in the controller for... well, pretty much anything else
Also consider what you'd have to do to your existing code:
1a. (Database) Model might need changes to an "insert" or "update" method so that it puts the data in correctly. Otherwise the "select" methods are the same.
1b. (Model) Model's "insert" and "update" are the same but the "select" needs to ucwords() the value it gets.
2. (Controller) You'd have to alter the $categories array you got from the model and that'll require a loop.
3. (View) Assuming the templating language supports it, make it invoke ucwords().