Black nightshade is an introduced weed of fields, gardens, and roadsides in many U.S. states. Its small white flowers become clusters of dull black berries, but it is easily confused with other nightshades.
American black nightshade (Solanum americanum) usually has smaller, shiny black berries and smaller flowers. Black nightshade usually has dull berries, but the group varies enough that one photo may not give a reliable answer.
Why they get mixed upBoth plants have white star-shaped flowers and clusters of black berries, and both occur in the United States.