As long as your cast-iron skillet is very well seasoned, it is okay to cook acidic ingredients like tomatoes in it. For more information, check out Kitchn's post about common cast iron myths.