Heat the oil in a large soup pot over medium heat. Add the onion and cook, stirring frequently, for 4 minutes, or until soft.
Add the garlic and cook, stirring frequently, for about 30 seconds. Add the tomatoes and broth. Raise the heat to high and bring the soup to a boil. Reduce the heat to low and simmer for 5 minutes. Add the sugar and pepper.
If you prefer a smooth texture, transfer the mixture to a blender and puree until smooth. Then transfer the soup back to the pot. If you prefer a chunky texture, skip this step.
Add the chickpeas to the pot. Cover with a lid and simmer for 10 minutes. Season to taste with pepper. Ladle the soup into bowls and top with a dollop of pesto.