There are better things that former Presidents can do than take cheap shots at those who come after them. They had their time to lead the country and they should make a graceful exit when their time is up. The Bush family is a good example of how to gracefully handle retiring from Presidency.
No, former presidents should be allowed to criticize those that come after them. The only people who truly know what is necessary to succeed as president are those who have held the position. Former presidents should be allowed to criticize those who take the position from them because they have the experience to give a respectable opinion.
In this country we have the right to freedom of speech. While it would be respectful for Obama to restrain his comments, he has the right to speak his mind as he sees fit. It is more a matter of respecting others than anything else. If Obama has something to say, he should be free to say it.
There is no reason that form or Presidents should avoid criticizing presidents that come after them. Free speech is too important to restrict any one person, regardless of who they are or what position they held, from not being able to say what they would like to say. If somebody is offended, that's a them problem.