Cloaking is a defensive system. When activated, it temporarily increases evasion by 60%, halts enemy weapons charge, and prevents drones from attacking. Each level of cloaking provides 5 seconds of cloak time, up to a maximum of 15 seconds at level 3. When the cloak ends, the system takes 4 ion damage, so it cannot be used again for 20 seconds.
Firing weapons disrupts your cloak, except for beam weapons. Each non-beam weapon fired during cloaking reduces the cloak time by 20% of the full amount. For example, firing a Burst Laser 3 will remove 2 seconds from a 10-second cloak. The Stealth Weapons augmentation removes this penalty.
Cloaking also prevents enemy crew from boarding or returning to their ship, and delays boarding and hacking drones. When an enemy ship is cloaked, you lose vision of its rooms, unless you have another source of vision (such as boarders on their ship). Without vision, you cannot use mind control; however, this does not apply to enemies, who can use mind-control against your ship even while you are cloaked (because they don't need vision).
Losing vision also means you cannot target weapons while an enemy is cloaked. However, if you have already selected the starting room for a beam weapon, you will be able to finish targeting it even after the enemy cloaks.
At the start of a fight, enemies will use their cloak immediately. By starting the fight paused, however, you have a moment before losing vision. This allows you to mind-control an enemy before they cloak, but you still cannot board until they decloak.
Cloaking is mainly useful to dodge enemy weapons after they fire. If your "base" evasion from engines and crew skill is 40% or higher, then evasion during cloak will be at least 100%, guaranteeing that every shot misses. Note that beams cannot be evaded; once a beam has started to fire, it will continue firing even if you cloak.
While level 1 cloaking is sufficient to dodge a volley of enemy weapons, higher levels delay enemy weapons even more. This can give you "free time" to charge your weapons. It can also buy time to escape a bad fight.
Unlike weapons, environmental hazards are not delayed by cloaking; they operate on an independent timer. Anti-ship Batteries and the Rebel Flagship's power surges are environmental hazards. Using a longer cloak may mean it's not ready for the next ASB or power surge. You may want to use a level 1 cloak, or fire weapons to shorten your cloak time once the hazard has passed.