Over the last few years the city of San Francisco has done a lot of work to make the city more bicycle friendly, for which I sincerely applaud them. Initiatives like Vision Zero and the good work from the SF Bicycle Coalition have made a huge, positive impact on cycling in San Francisco. However, there's still a lot of work to be done, and in my opinion removal of the train tracks on Market St should be at or near the top of that list.
Light rail train tracks pose a huge problem to cyclists. The tracks are slick metal with grooves just wide enough to fit bicycle tires. A cyclist crossing the tracks with an insufficient angle will have their wheel caught in the tracks which will cause them to crash. This is especially dangerous when the front wheel is caught in the tracks (the most common case for unwary cyclists) since it will typically result in the handlebars suddenly twisting and getting stuck which will throw the cyclist over the handlebars and the front of the bike, frequently head first. I've witnessed a lot of accidents due to train tracks, and crashed myself due to them.
While light rail tracks can be dangerous to cyclists, light rail is also typically very convenient for commuters. There are two factors that make light rail especially convenient, for instance compared to buses. The first is that in situations where the light rail is underground or elevated, the trains can bypass normal street traffic. The second is that light rail trains can be easily made quite long, which give them greater carrying capacity than buses. There are also a number of things cities can do to mitigate the danger that light rail poses to cyclists. The best solution is to run trains below ground or on elevated platforms, as this puts the trains completely out of the way of cyclists. This has the added benefit of making the trains run faster, as already mentioned. When this isn't possible the next best thing is to avoid putting train tracks parallel to where cyclists are likely to be, and ideally to create convenient cycling corridors on adjacent streets to encourage cyclists to be out of the way of these train tracks.
San Francisco's F-Market & Wharves line (henceforth abbreviated "F-Market"), also known as the "Historic Streetcars" line, is a great example of all of the worst factors of light rail convenience and bicycle safety combined. The F-Market runs from 17th & Castro down the length of Market St to the Embarcadero, and then north someways along the Embarcadero towards Fisherman's Wharf. The line operates a "heritage streetcar service", meaning that the trains used are vintage streetcars from light rail systems around the country.
My main criticism of this line is that for nearly its entire route down Market St the train runs parallel to and isn't separated from traffic or cyclists. Technically the tracks don't enter the bike lane, but for most of its length the bike lane runs right alongside it. Cyclists regularly need to cross the tracks in routine traffic, for instance to maneuver around stopped vehicles. I have to imagine that these tracks account for the most dangerous hazard to most cyclists in the city, simply because of their placement and because of the fact that Market St is so heavily trafficked by cyclists. There are other light rail lines in the city that aren't separated from traffic (e.g. the N Judah line), but those lines aren't on major cycling corridors and therefore in practice are significantly less dangerous to cyclists.
Furthermore the F-Market line isn't really convenient to anyone, at least not on the stretch down Market St. There are subway tracks underneath Market that serve all of the "Muni Metro" lines, the other light rail system. That is, the subway under Market St serves Metro lines J, K, L, M, N, and T. The Metro lines are much faster because they are underground and therefore avoid traffic. The Metro trains are also typically of much higher capacity since they use standard train cars instead of repurposed "heritage" cars. If the city were to restrict the F-Market line solely to its route along the Embarcadero (where it is faster and safer since it is separated from other vehicle traffic) very few people would be inconvenienced.
What makes this even more infuriating is that there are a lot of regular Muni bus lines already on Market St. The buses are actually cheaper to operate than light rail anyway. People who don't have convenient access to the Metro system or are traveling to a part of the city not served by one of these lines are already taking the other Muni buses operating along Market St. In my mind there is almost no practical reason for the F-Market line to operate on Market St at all. The only function it serves is for the aesthetic appeal of the historic streetcars. But this comes at a grave cost to cyclist safety.
If San Francisco is serious about improving cycling convenience and safety I implore them to consider restricting the F-Market line to its Embarcadero stretch, and to pave over the tracks on Market St.