The image shows B&M locomotive #827 on its side, with B&M crane #3359 hooked up to a baggage car. The area has multiple tracks and a signal, which helped confirm the location of Lynn Massachusetts, just west of the West Lynn station. (The Boston, Revere Beach & Lynn RR also had a West Lynn station)
The only real lead I had to go by was the sign in the distance atop a commercial building. It appeared to read "Hoag & Wald_n", which I assumed was "Walden" or "Waldon". After much web searching, I found a reference to a shoe manufacturer in Lynn named "Hoag & Walden".
I then started looking at old maps and aerial photos to see if I could find the building in the middle-background, as it had an easy-to-spot roof style. I finally found the exact building, which in 1916 belonged to Fred M. Page & Company, "manufacturers of cotton and paper specialties"and was located on 29 Bennett Street. Amazingly, this building was still standing as of 2014, though partially re-sided and in tatty condition. There was also a building to its left that may possibly be the one in the photo with a water tower on the roof. If so, it has been altered quite a bit.
As for the key Hoag & Walden building, it was located on Commercial Street in an area that appears to now be a playing field.
Now that I had located the location of the photo, I needed to figure out the date it was taken. I used an online newspaper archive to search for Lynn train accidents that made the news. I knew that locomotive #827 had been scrapped in 1913. I used that date, along with the style of automobiles in the photo, to narrow down my search. I finally found a short article in the March 29, 1910 issue of The Lowell Sun newspaper which said that just before noon, the "Portland express... Train 44" derailed while traveling on the Eastern Division toward Boston. The train consisted of "a couple of baggage cars, a Pullman, and three regular coaches, the latter being in the rear". The passenger cars being in the rear explains the baggage car being present behind the locomotive.
The train was not scheduled to stop at West Lynn, and left the track "a hundred yards beyond that station", followed by all but two coaches. The article states that an open switch had caused the accident, which also confirms the photo's location, as even today there is a track that curves off the main. This is the now abandoned Saugus Branch.
No one died in the accident.