Are the tomatoes still good to eat?
Certified GKH Gardening Expert
As long as there aren't any visible signs of pest infestation IN your tomatoes (holes from worms, etc.), they should be perfectly fine to eat once they ripen. If the plant is too far gone to save, you'll want to pull the fruit off and let it ripen indoors. This article gives information on how to do that: https://www.gardeningknowhow.com/edible/vegetables/tomato/how-to-turn-green-tomatoes-red-how-to-store-tomatoes-in-the-fall.htm
If the reason for your tomato plant wilting is a "fixable" one, this article will help you identify that, and give you tips on possibly saving your plant(s):