Preheat the oven to 180°C / 160°C Fan / 350°F / Gas Mark 4.
Spread the halved cherry tomatoes and white beans across a baking tray. Drizzle with olive oil, then add the garlic, rosemary, salt, and pepper. Toss gently to combine.
Roast in the preheated oven for 15 minutes.
Season the sardines with salt and pepper, then arrange them on top of the roasted tomato and bean mixture.
Return the tray to the oven and bake for an additional 8 minutes, until the sardines are just cooked through.
Remove from the oven and serve immediately, straight from the pan if desired.