Patent marking is a topic I discuss at various portions of my book. In the U.S., marking is sometimes, but not always, a requirement to an action for past damages. And it can be unlawful to falsely mark unpatented products as patented, although the America Invents Act amended the statute to make it more difficult for third parties to assert claims for false marking. Overall, I'd say that the U.S. rules on patent marking are probably the most complicated anywhere. For those of you who are interested, the slides I use in my Advanced Patents class to discuss the U.S. law on patent marking are here. (The usual caveats apply: this is not legal advice, etc.).
Some countries, such as the U.K. and Australia, condition the patentee's ability to obtain damages on the defendant's having knowledge or notice of the patent, and provide that patent marking can be one way to put potential infringers on notice. (See my book, p.185.) Others, such as Canada, Japan, and (to my knowledge) most of the European countries, don't require that the defendant have any advance knowledge or notice at all (though Canada at one time did require patent marking, and Japanese law recommends but does not require it). (See id. at 185 & n.79, 309 n.94.) In addition, most countries provide some sort of penalty for false marking, though I can't speak to the extent to which this requirement is enforced everywhere. As noted in my slides above, after lying dormant for years, for a brief while the false marking statute was grossly overenforced in the U.S. following some crucial Federal Circuit case law, until it was reined in by the AIA.
An issue of China Intellectual Property from last summer (7-8 2012) featured an article by Sun Fengtao, Wang Xia, Yang Yingxiao, and Li Xiaoli titled "Patent Marking in China and Right to Affix Patent Markings" (translated by Wang Hongjun). In China, patentees and their voluntary liucensees may, but are not obligated, to mark; and false marking is unlawful. (See also my book, p.354 n.90.) The authors also discuss the question of whether a compulsory licensee has the right to mark its products with the patent number, and conclude that the answer is no. In addition, they argue that owners of method or component patents may mark the products produced by those methods or components, while noting that the statute is silent on the issue.
My own view, for what it's worth, is that patent marking ought to be voluntary, not a precondition to an award of damages. The rules that have developed around this issue in the U.S. do not ensure that potential infringers be put on notice, and in some applications the results seems entirely arbitrary. But this may be yet another feature of U.S. law that, for reasons of inertia, may be difficult to change anytime soon.
For a good article on the comparative law of false marking, see Masako Kikuchi, The Thread of False Marking, 5 J. Intell. Prop. L. & Prac. 803 (2010).