You can define different line widths in mapnik with a filter e.g.
<Rule>
<Filter>([type]='motorway')</Filter>
<LineSymbolizer stroke-width="0.5" stroke="#000" />
</Rule>
<Rule>
<Filter>([type]='primary')</Filter>
<LineSymbolizer stroke-width="1" stroke="#000" />
</Rule>
To create more complex mapnik files I usually use Tilemill because I find CartoCSS easier readable and well documented. For more information consult the guide for styling lines and the CartoCSS reference.
An example for styling road lines could be:
#roads {
[type='motorway']{
line-width:.5;
line-color:#168;
}
[type='primary']{
line-width:1;
line-color:#168;
}
[type='secondary']{
line-width:1;
line-color:#168;
}
[type='residential']{
line-width:1;
line-color:#168;
}
}
After creating your map in Tilemill you can export the style as Mapnik XML which you can use then in your application.