Tomatoes can split either in "concentric" cracks, which appear around the step at the top of a tomato, or in "radial" cracks, which run vertically along the fruit and are bigger.
In the case of concentric cracks, your tomatoes will generally be safe to eat as the flesh won’t be exposed to the air, reducing the chance of bugs or other nasties getting in.
When it comes to radial cracks, you will need to determine the size of the crack, and how long the crack has been there before you decide to use or toss the tomato.
Look carefully, and if there are signs, like rot, bugs, slime, or a funky smell, throw the tomato away. If not, it's fine to eat, although it's advisable to cut the split part off.
When it comes to split green tomatoes; however, there's a higher chance they'll be rotted or inedible by the time they ripen since they’ll have remained exposed for longer.