This plant came up as a volunteer in a planter box - might have been in the compost. Your ID help would be appreciated.
If those berries change to black color, when ripening, then the Black nightshade (Solanum nigrum) is a likely option. That's for sure, that this plant belongs to the Nightshade family.