Heat a grill on medium high heat. Place whole tomatoes, pepper and onion slices over direct heat. Cook 5 minutes or until it begins to get some char. Flip and cook another 5 minutes. Remove to a bowl and let cool.
Remove the stem and seeds from the peppers (use gloves so you don't get any oils on your hands, if you have a lot of charring on your peppers you can scrape it some off.
Place peppers, tomatoes, onions, garlic, cilantro, lime juice, sugar and salt in a food processor. Pulse until blended.
Taste and season with more salt, sugar and lime juice if needed.
Store in airtight container in the refrigerator for up to 4 days.
Notes
You can also broil the tomatoes and peppers instead of grilling