Depends on what you want to achieve? When diffing source code, comparing lines, without caring too much about the broader context, may be a good-enough proxy of what you ideally want to compare, which is the program’s logic. But for the latter, you would first have to execute both programs, and diff their parse trees.
Likewise – and perhaps most notoriously – simple line-based diffing does not suffice for diffing prose (natural language text), where knowledge of the broader context, markup (semantics in punctuation and document structure), and paragraph order are crucially important.
programs are self-contained entities, whereas prose often drags in multitudes of real-world context involving assumptions, motives, and other considerations.
a diff might inform you of an edit in chapter 2 where you changed a man's status from "divorced" to "widowed" (to make him appear more sympathetic), but it won't also remind you that you need to rewrite that section in chapter 25 where the man gets a phone-call from his former wife.
this type of thing happens a lot, in ways that are much more subtle than that silly example. and it's usually because the arc of the story is greater than (and different from) a simple sum of its pieces.
Likewise – and perhaps most notoriously – simple line-based diffing does not suffice for diffing prose (natural language text), where knowledge of the broader context, markup (semantics in punctuation and document structure), and paragraph order are crucially important.
Besides the rudimentary one, used by Github (https://github.com/blog/1784-rendered-prose-diffs), I do not know of any production-ready prose-diffing implementation.
But here is an interesting proof of concept: http://www.gigamonkeys.com/tmp/test-diff.html