He had gone to Germany for a conference. While walking back to his hotel, had to cross the street. There were no vehicles in sight, but the light was red. After waiting for some time, he thought "what the heck", and crossed the street even though the light was still red. After a few minutes, a German man walked up to him and said "Mr. Amartya Sen, in Germany we follow the rules even if there are no cars". He apologised to the German, and asked him if he knew him, may be from the conference. To which the man replied, "I have no idea who you are, I just read your name from the conference ID card hanging from your neck".
As one of the grandparent comments correctly pointed out, jaywalking is legal in Germany if the road is empty. (A policeman's instructions would override this rule, however.)
Source: https://www.gesetze-im-internet.de/stvo_2013/__25.html
There is also an unspoken rule for jaywalking, don't do it around kids. I also saw 3 tween girls walking across the street on a green, they were right around half way when the crosswalk light turned red. They all turned around and went back. It was kind of funny. My American friend told me a funny story where he was drinking with German friends, and they walk back at like 3am with no cars in sight and he of course crosses the street and all the Germans were back at other side waiting for it to turn green.