If someone hits you from behind, it is virtually never your fault, regardless of why you stopped. A basic rule of the road requires a vehicle to be able to stop safely if traffic is stopped ahead of it. If it cannot stop safely, the driver is not driving as safely as the person in front.
The other sure-fire part of the rear-end accident claim is that the damage proves how it happened: If one car's front end is damaged and the other's rear end is, there can't be much argument about who struck whom. Of course, the driver of the car that hit you may have a claim against someone who caused you to stop suddenly, or against a third car that pushed his car into yours. But that doesn't change his or her responsibility for injuries to you and damage to your car.
Keep in mind, however, that even if you have been rear-ended, in a few circumstances your own carelessness may reduce your compensation under the rule of "comparative negligence." A common example is when one or both of your brake or tail lights were out, especially if the accident happened at night. Another example is when a car had mechanical problems but the driver failed to do all she could to move it off the road.