As I work in law enforcement, let me just add that while you can take pictures if you want to, you have to be careful where you are relative to the scene. Do not, under any circumstances, cross a police line that has been strung up. Also, bear in mind that there might be more than one line, so even if you see a line of yellow tape, and then a second line of yellow tape closer to the scene, do not cross the first one to get to the second one. Basically, do not cross any tape that has been strung up to mark the scene.
That being said, you might be asked to leave or move for safety reasons. Even if you aren't concerned about your own safety, we are. You might want to argue that you can stand anywhere you want, but that's not entirely true, and besides, that's not the best time to start that argument. We have a job to do, and if we believe you are preventing us from doing our job because we have to stay focused on you, we will help you leave. So, if you are asked to leave or step back, it is best to do so. You most likely do not know everything that's going on, and the last thing we need is another victim because the shooter we were trying to capture decided to shoot at you and your camera.
If you feel you have been violated or treated unfairly, you should (maybe even must) report your concern to the law enforcement agency that had you leave. I am not under any circumstance suggesting that someone's rights to be in a public place should be violated, but I am suggesting that there is a better place to register your complaint than on the scene of a crime.
One last thing to consider as you originally mentioned accidents (although this applies to any scene)... you almost certainly do not know where the scene begins and ends when there is no crime scene tape strung up, as on an accident scene. If you start walking around trying to get "the picture" you run the risk of entering an area that needs to be protected. Trust me when I say that you don't want to find yourself inside of a scene.
Phew... so, after all of that, let's see if I can sum this up:
- Do not cross crime scene lines, ever.
- Do not try and get too close for safety reasons.
- Listen to the police when they ask (or tell) you to leave or move back.
- Bear in mind that scenes may not be clearly marked but that doesn't mean you can just walk wherever you want as you may be damaging evidence (this is most applicable to crash scenes).
- If you feel your rights have been violated, do not argue your rights on the scene of a crime. Instead, go to the law enforcement agency in question and formally register your complaint.
I hope this helps. There's no reason to be afraid to get pictures, but use your head when doing so.
EDIT: I need to add that I am speaking as a law enforcement officer in Georgia. Other states almost certainly have their own spin on situations like this, but I would expect that the advice I give is applicable most anywhere.