Prepositions are so versatile in their usage that it's difficult to give exact rules on their usage. However, here is rough guideline from English Club: Prepositions of Place: at, in, on
In general, we use:
- at for a POINT
- in for an ENCLOSED SPACE
- on for a SURFACE
at Point in ENCLOSED SPACE on SURFACE
at the corner in the garden on the wall
at the bus stop in London on the ceiling
at the door in France on the door
at the top of the page in a box on the cover
at the end of the road in my pocket on the floor
at the entrance in my wallet on the carpet
at the crossroads in a building on the menu
at the front desk in a car on a page
Using the OP, we have
The newest branch of the library is located on Pine Street.
You use on when you want to talk about a building and its relation to a street. Roughly, you can consider the street as a "surface" so that it follows the guideline above.
The street is not really a point, so we don't use at. However, a specific address, like 123 Pine Street, is considered a point. In such a case, you could use at:
The newest branch of the library is located at 123 Pine Street.
The street is not really an enclosed space, so we don't use in. However, a specific city, like Los Angeles, is consider an enclosed space. In such a case, you could use in:
The newest branch of the library is located in Los Angeles.
I think the commentary you mentioned is referring to this specific example above. Referring to "writing in front of building", it's possible to use in. For example, there could be a sign in front of the building that reads
Our collection of contemporary works is located in this building.
Here, you can use in because the building is considered an enclosed space.