Q.I have holes in some of the leaves on my tomato and cucumber
How can I find out what it from
Unless you see the culprit or culprits it is difficult to identify the insect or caterpillar.
Most insects can be controlled with an application of Neem Oil. Neem Oil is organic and is safe for people, pets and bees.
Here are some articles that will help you.
https://www.gardeningknowhow.com/plant-problems/pests/insects/holes-in-plant-leaves.htm
https://extension.entm.purdue.edu/publications/E-65.pdf
https://www.gardeningknowhow.com/plant-problems/pests/pesticides/homemade-soap-spray.htm
https://www.gardeningknowhow.com/plant-problems/pests/pesticides/neem-oil-uses.htm