Topping may be a popular practice, but it is absolutely the worst type of pruning for the health of a tree. Instead, it's best to evenly thin out the branches. Contact a licensed arborist; he or she will advise you and will prune for the safest, most prudent method of increasing light for your vegetables. Depending on the placement of the trees and your attachment to them, you might also remove one tree to create a "light window." Or consider moving your vegetable garden to a brighter spot.