Preheat the oven to 400 degrees F (200 degrees C).
Combine tomatoes, bell pepper, onion, olive oil, basil, and garlic in a bowl and mix well.
Lay 4 sheets of aluminum foil on a work surface and place 1 cod fillet in the center of each. Spoon tomato mixture evenly on top of the 4 fillets. Drizzle with lemon juice and season with salt and pepper. Place a second sheet of foil on top and seal the edges to make a parcel. Repeat with the remaining fillets and tomato mixture.
Bake in the preheated oven until cod flakes easily with a fork, about 20 minutes. Remove from the oven and carefully unwrap the parcels. Spoon onto warmed plates and serve immediately.