According to CNN:
Sudanese security forces have begun seizing laptop computers entering the country to check on the information stored on them as part of new security measures.
One state security source said the laptops are searched and returned in one day and that the procedure was introduced because pornographic films and photographs were entering Sudan.
U.N. officials, aid agency workers, businessmen and journalists who regularly visit Sudan worry the security of sensitive and confidential information such as medical, legal and financial records on their computers could be at risk.
Authorities have cracked down on organizations like Medecins Sans Frontieres, the International Rescue Committee who have published reports on huge numbers of rapes in the violent Darfur region.
(More commentary here.)
While the stated reason is pornography, anyone bringing a computer into the country should be concerned about personal information, writing that might be deemed political by the Sudanese authorities, confidential business information, and so on.
And this should be a concern regardless of the border you cross. Your privacy rights when trying to enter a country are minimal, and this kind of thing could happen anywhere. (I have heard anecdotal stories about Israel doing this, but don’t have confirmation.)
If you’re bringing a laptop across an international border, you should clean off all unnecessary files and encrypt the rest.
EDITED TO ADD (9/15): This is legal in the U.S.
EDITED TO ADD (9/30): More about the legality of this in the U.S.