How might we account for the presentation of Ulysses as villain in Vergil's Aeneid?
This is a worthwhile question since Odysseus/Ulysses is one of the "good guys" in Homer. In Vergil's Aeneid, though, Ulysses is regarded as one of the most evil of the Greeks.
The simplest explanation is that he is a Greek and the Greeks are the enemies of the Trojans. Therefore, Ulysses must be regarded as enemy.
A second reason for the negative portrayal of Odysseus/Ulysses is that even among the Greeks, Odysseus had a reputation for cunning and cruelty. Sophocles' Philoctetes, in particular, and several surviving Euripidean plays characterize Odysseus as a ruthless double-crosser.
Another reason for the negative portrayal of Ulysses is that he is a trickster and this is a value that the straight-dealing Romans do not admire in their leaders. Aeneas is described as pius, dutiful with respect to the gods, country, and family. Ulysses, on the other hand, is wily and cunning. Ulysses attacks during the night and uses the deceptive method of the wooden horse to defeat his enemy. Aeneas fights during the daytime and on the open battlefield.