I am on holiday in Berlin and I have noticed that no pedestrians cross the road until the green man is on, I was wondering if there is some sort of jaywalking rule, also some of the vehicles go through a pedestrian crossing even when a green man is showing.
Ok, JoErNanO explained the legal part, now as German I am able to explain the unofficial part.
It has nothing to do with a fine. You are disobeying openly a rule while others are present. The amount of consistency is variable, people from Northrhine-Westphalia are more prudent to ignore lights than those from Bavaria.
If noone is present, no cars at night etc. Germans are jaywalking all the time. If they don't, they have time or are in a state of operating laziness (They are looking at the mobile or talking with others, so they switched to automatic mode).
The violation is ignoring the rule where the lights are present. You can test that for yourself: Move 20 m apart from the lights, look busy, wait until the road is clear and cross the road. You will be ignored. The clear part is important: If a car is approaching and you are still on the road, you are considered an enemy and it will be communicated by aggressive driving-by, last moment breaking, swearing, giving you the finger and if you acting cocky, even violence.
You will also feel that it is more difficult to cross the road once several people are present. There is a feeling of self-reinforced presence: Once someone decided to wait, it forces the others to be polite.
Positive bonus points for being on the street while the light is still green (you are allowed by law to cross the road when the light was green), you seem to be really in a desperate hurry, the light is taking too long to switch or no cars are present. Mitigating circumstances.
If you on the other hand really want to piss Germans off, you cross calmly the road with red lights while children are present. You don't want to do this New York Style if cars are present because you likely end as hood decoration (remember the passage above ?). The cars itself are blocking the street because in rush hour they are desparate to get as many cars as possible over the line. This is tolerated, simply weave through the cars.
Ignoring Pedestrian Markings Is Forbidden
In Germany, traffic signs at regulated pedestrian crossings must be used by pedestrians. This is stated in the German Highway Code, article 25 (Straßenverkehrs-Ordnung (StVO) § 25 Fußgänger):
§ 25 Fußgänger
(3) Wer zu Fuß geht, hat Fahrbahnen unter Beachtung des Fahrzeugverkehrs zügig auf dem kürzesten Weg quer zur Fahrtrichtung zu überschreiten, und zwar, wenn die Verkehrslage es erfordert, nur an Kreuzungen oder Einmündungen, an Lichtzeichenanlagen innerhalb von Markierungen oder auf Fußgängerüberwegen (Zeichen 293). Wird die Fahrbahn an Kreuzungen oder Einmündungen überschritten, sind dort vorhandene Fußgängerüberwege oder Markierungen an Lichtzeichenanlagen stets zu benutzen.
Which roughly translates to:
§ 25 Pedestrians
"(3) Pedestrians must cross roadways always in a speedy manner, using the shortest way orthogonally to the driving direction. If the traffic situation requires it, the crossing must be restricted to intersections, T-Junctions, marked crossings at traffic lights or zebra crossings. When crossing at an Intersection or T-Junction, any street markings or traffic lights must be used."
Crossing anywhere else is an administrative offense
Turns out that not respecting article 25, paragraphs 1-4 constitutes an administrative offense. Quoting from German Highway Code, article 25 (Straßenverkehrs-Ordnung (StVO) § 49 Ordnungswidrigkeiten):
§ 49 Ordnungswidrigkeiten
(1) Ordnungswidrig im Sinne des § 24 des Straßenverkehrsgesetzes handelt, wer vorsätzlich oder fahrlässig gegen eine Vorschrift über
[...] 24. das Verhalten a) als zu Fuß Gehender nach § 25 Absatz 1 bis 4,
Which roughly translates to:
§ 49 Offenses
(1) Any person who willfully or negligently acts against the following provisions is committing an administrative offense within the meaning of § 24 of the Road Traffic Act, [...]
- Behaving a) as a pedestrian in any other way as those allowed according to § 25 paragraph 1 to 4,
(Translation is my interpretation of google translate's pitiful attempt.)
And Traffic Lights Must Be Obeyed
There is another article (§37) defining light signals in details and another provision in §49 referring to §37.
What was not addressed in the other answers is the part where vehicles cross while pedestrians have a green light: Imagine the following Situation
The silver car on the right was a green light, as have the pedestrians going in the same direction. The pedestrians have right of way, but the silver car is allowed to make a turn accross the way of the pedestrians. I'd imagine it would be the same way in other countries, too.
I believe it is forbidden but, unlike in some other countries like the Netherlands and Austria, I have never heard about any enforcement in Germany. A quick web search reveals that the fine for doing it is only €5 so fear of punishment for jaywalking does not seem to fully explain that behaviour.
The fine can be increased to €10 if crossing a red light creates a serious accident, which is kind of ironic because it still isn't much and odds are that the culprit already suffered much more drastic consequences than a fine in this case.