Whenever a ship uses cloaking technology (well, at least in terms of the Romulans and Klingons in TNG), there is a 'wobbling' effect of light as they activate/deactivate the cloak. Now, I know that cloaking works by the bending of light and that this effect is used to make it apparent that cloaking is occurring, but my question is why does this 'wobbling' effect of light occur (note I'm looking for an in-universe explanation of this, not necessarily a scientifically accurate one, but more of someone in universe (or even an authority e.g. a writer out of universe) explaining the reason for this)
As far as I know this is never directly tackled by canon material, but there are enough in-universe descriptions of cloaking technologies that we can make an educated guess.
The following reasons may hold:
- Some cloaking technologies use tetryon compositors. Tetryons interact with subspace, and appear to naturally exist as "fields" within subspace. Those fields may interact with the cloaking field somehow and slightly destabilise the cloak, hence the wobbly effect.
- Cloaking is usually performed by emitting a "cloaking field" from the deflector shield (as per TOS 3x04), which implies that the false sensor readings and visuals are created by the field dynamically changing to the perspective of entities in regular space. As this reactionary process relies on sensor readings, which are inherently imperfect, there will be slight aberrations.
- On numerous occasions it is noted that cloaking requires massive power (often in relation to some kind of "we can't fire when cloaked" rule). Since power fluctuations seem common on ships when systems are heavily taxed, we could infer that the visual "wobbling" is a result of those fluctuations.
- Cloaking is an immature technology which most species don't appear to have perfected. In fact, the UFP/Romulan Treaty of Algeron forbids the research and use of cloaking devices by the Federation. Gene Roddenberry himself once stated "our heroes don't sneak around" as an explanation for this.
Of course, the visual effect was likely just used to show the viewer that the ship was cloaked.
The wobbling effect as you call it is essentially a mirage, or heat haze, heat shimmer, visual heat turbulence (wiki). Whatever you call it, we have all seen it at some point on a hot summer day. Heat off an object causes the air around the item to heat and cool, affecting light and makes it look like the air is moving around. The light itself is moving at different speeds in the different temperatures, producing the shimmers.
A typical tactical cloaking device's main objective is to hide a ship's energy signature from enemy sensors. Said energy includes visible and invisible light, heat, radio, and other sections of the EM spectrum. Some were better than others at some of these sections. But all tend to have high power requirements which results in high energy production and waste.
Additionally, most cloaking devices bend light (and the other energy types) in order to produce the cloaking effect. Combining high energy output (aka heat) and light bending, when you turn the cloak off, you will undoubtedly produce heat shimmers.
First, I would like to inform every reader, that I have no in-universe quotations to back my words, so please handle this answer with care. (I mostly rely on my memory and physical knowledge on this one. Sorry, but I have no time to perform a proper research.)
As far as we know, the Klingon/Romulan cloaking technology works by either bending light around the ship or by hiding the ship itself in a "cloaking field". Let's see those explanations one-by-one:
If the cloaking device bends the light to avoid the ship's hull, then the solution is easy: Imagine the path of light beams near but avoiding the ship (virtually strait), and the path of light beams that would pass through the ship. Bended, so slighthly longer. This difference would create a lensing effect which would explain the sight you have asked for.
Now, the other solution with the "cloaking field" involved is a more speculative one. If my memory does not mislead me one of the DS9 episodes, a cloaked Romulan vessel could be detected by tachyonic leak (which in-universe always a sign of either a time-travelling or a transphase technology), and in one of the TNG episodes some crew members enter an alternate(/trans)phase in an accident involving a cloaking device. [I'm not sure, please clarify or deny it. I will fix my answer accordingly.] Now if those memories of mine are clear it means, the cloaking field is some sort of phase-shifting field. Not strong enough to move the cloaked ship into a different phase, but strong enough to "balance it" on the boundary of being transphased engaging light to pass through (and possibly all exhausted energy to leave into the transphase state). In that case the key is not being entirely transphase. If the ship was out of phase it could not detect (see) noncloaked ships, could not land on planet surfaces (Like in "The Voyage home".), or being hit by a photon torpedo. (Which happened to the U.s.s. Defiant more than once.) Also cloaked mines would not work. But if those ships are just partially transphase, the van der Waals forces between their particles must still interact with the normal space photons (otherwise cloaked ships would have been blind), which would somewhat slow those photons down (remember light spreads slower in non-vacuum) once again creating a lensing effect.