Start heating your oven to 200 C / 400 F / Gas Mark 6.
Quarter the balls of mozzarella, then slice each quarter up.
Slice the tops off the tomatoes (do the slices in such a way that you expose a wide enough working surface inside the tomato.) Check that each one will sit upright -- if not, nick a bit off the bottom of the problem tomatoes. Scoop out the insides of the tomatoes and discard or (ideally) freeze for another use such as freshening up a store-bought sauce.
Brush the sides and bottoms of the tomatoes with olive oil.
Put a teaspoon of pesto in the bottom of each hollowed-out tomato, followed by a slice of cheese, another dob of pesto, and so on, ending with cheese and maybe a small dob of pesto on top for looks. Aim to have the tomatoes almost filled to their brims.
Put on a cookie sheet and pop in oven until cheese is starting to melt -- about 10 minutes. Serve hot.
Notes
You can adjust the quantities up or down as needed.Ideally, use smallish tomatoes. Not cherry tomatoes — it would take forever — but smallish normal-sized tomatoes.Attention North Americans: ideally, you want to use real mozzarella cheese — the kind that is sold in a ball in whey. About 2 balls are needed for a dozen tomatoes.