Usually, you want to render all markup server-side. There are plenty of reasons why, but the one you hear often is for better search engine optimization. It's because search engine crawlers don't evaluate JavaScript. Though, there are cases when rendering markup client-side is the right thing to do. An example would be if you need to generate html from user input that results in lots of variations. It may be the case where trying to use lots of AJAX calls would be too costly on server load. Another example would if you're just rapid prototyping and developing a template that will eventually live server-side.
Here I demo JavaScript Micro Templating Engine by jQuery creator John Resig.