This is Western Horsenettle and it is very pretty but it is also toxic, especially to animals. It is a member of the nightshade family. It is a big problem for cattle and horses that graze. Don't let your pets eat it either. All parts of the plant are toxic with the fruit being the worst.
Western Horsenettle (Solanum dimidiatum)