Mexico, like the United States can be dangerous. There are good neighborhoods and conversely there are bad neighborhoods.  For the purpose of this article we are going to focus on Los Algodones, Mexico, not Mexico as a whole which is a whole different animal.
Our experience in late 2016 and early 2017 was that Los Algodones was a very safe town. The town is teaming with Americans, most who are 55+ who come for cheap dental work, prescription eye glasses and of course tequila!  As you walk across the boarder you may see the boarder staffed by Federales (Mexican Federal Police). During our various visits we saw the boarder staffed and also saw it empty with nobody but locals in the area.  When you walk along the streets of Los Algodones it becomes clear that the town's primary purpose is commerce. Everyone is there to either buy something or sell something. This may sound like a bad thing, but in our opinion, it isn't. The locals are there to make you comfortable and to ensure you want to come back and buy their goods. The town as a whole seems to work together to ensure tourists feel welcome and safe. Now that said, vendors are not shy, they are quite vocal and approach you on the street to offer everything from teeth cleanings to local hand made goods. They are perfectly harmless but you'll find yourself saying "no gracias" or "no thank you" quite a lot!
Just about everything in Los Algodones begins to close up at 4:00pm so plan your day accordingly.  The boarder is technically open until 10pm pacific time however we recommend you cross back to the U.S. before dark just to be safe.