I understand that a gardener would want to intercrop beans which are legumes and fix nitrogen in the soil with their tomatoes which are heavy nitrogen feeders. The problem with castor beans is that they are not beans. They are just called that because their seeds look like beans. Castor beans are actually small tropical trees that grow to 15 feet tall. They would compete with your tomato plants for nitrogen and other nutrients as well as for water. And because of their height and broad leaves, they would shade your tomato plants which would suffer from a lack of sunlight, water, and nutrients and probably not fruit well if at all. I think it would be best if you planted your castor beans somewhere else in your garden/yard where they would not interfere with your other plants.