If you have static ListItems in aspx:
<asp:listitem style="color:green;">2</asp:listitem>
Visual Studio will complain about 'style' is not allowed attribute but it will render fine.
If you have databound ListBox you can do this in 'ondatabound' event:
protected void ListBox1_DataBound(object sender, EventArgs e)
{
ListBox lb = sender as ListBox;
foreach (ListItem item in lb.Items)
{
item.Attributes["style"] = "color:yellow;";
}
}