On a large baking sheet, arrange the halved tomatoes, quartered onion, and unpeeled garlic cloves. Drizzle with olive oil and sprinkle with salt and pepper.
Roast in the oven for about 30-35 minutes, or until the tomatoes are soft and caramelized.
Remove from the oven and let cool slightly. Once cooled, squeeze the garlic from its skins and discard the skins.
In a large pot, combine the roasted tomato mixture with the vegetable broth. Add sugar if desired. Bring to a boil over medium heat.
Reduce heat and simmer for 10-15 minutes to blend the flavors.
Use an immersion blender (or transfer to a blender) to puree the soup until smooth.
Stir in the fresh basil leaves and heavy cream if using. Let it simmer for an additional 5 minutes.
Taste and adjust seasoning with salt and pepper as needed.