Preheat the oven to 400 degrees (200 C)
Wash broccoli and sweet potatoes. Cut stems from broccoli and split florets into bite-size pieces. Cut the ends from sweet potatoes, then cut them into small 1/2-inch cubes for roasting (you do not need to peel them before roasting).
Arrange the sweet potatoes and broccoli on a roasting pan and drizzle with olive oil. Toss the vegetables to cover with oil and sprinkle with sliced garlic, salt, and pepper. Place sheet pan in the oven and roast for 35 minutes, stirring partway through to brown on all sides.
Remove pan from oven, arrange vegetables on a plate and serve as a side dish or let cool and use as a salad topping.