It depends, but it is frowned upon by many.
I personally think it's useful for some genuine cases. For example, look into how the forum software "discourse" renders it's content. It renders normal page content if script is not enabled, and generates content by ajax; when it is enabled. Can this be categorised as content cloacking? Not sure, but technically it should be the same.
As for hidden content, consider tabs for example. The active tab is shown to the user, while the others are hidden. Same for slideshows as well. Does any site which has tabs/slideshows get some kind of algo penalty? I have not heard about such incedences yet.
Something similar happens for links as well by the way. How about hamburger menu? All the links are initially hidden, visually. When you click the icon, it gets visible. By theory, any site which uses such menus should be penalised lol (I haven't heard anything like that either).
P.S., I am not a seo guru, but rather a developer. Take my suggestions with a few grains of salt.