Planting squash and cucumbers around the Fourth of July can help gardeners avoid common pests and boost harvests.