Sonicating is preferable if it seems like your protein concentration on blots are not enough for the antibody to detect properly.
Otherwise keeping cells resuspended in RIPA or NETN buffer on ice for 30 minutes to 1 hour is enough for preparing cell lyate. You can also keep on end-over rotor for mixing at 4 degrees for 30 minutes to 1 hour.
To answer some of the more interesting research questions, you often need to get a good look at what’s going on inside the cell. Whether you’re running a Western blot or measuring enzyme activity, many assays require access to the materials (e.g. proteins, DNA, subcellular fragments) contained within the cell walls.
There are several ways to penetrate the cell, both chemical and physical.
In the case of sonication for cell lysis, ultrasound (high-frequency) energy is applied to samples to agitate and disrupt the cell membranes.
Sonication is most commonly performed using an ultrasonic bath or an ultrasonic probe. The latter is better known as a ‘sonicator,’ and is one of the most preferred methods for cell lysis by sonication.
Sonication may seem like magic, but the reality of it is much simpler. The power source attached to the probe generates sound energy electronically, usually within a range of 20-50 kHz. This energy is converted to mechanical energy, which traverses the metal probe that is inserted into the cell-containing sample (probe method) or through the water in an ultrasonic bath. These changes result in the formation and violent implosion of small “bubbles” in the sample. This process, known as cavitation, ultimately causes cell rupture and successful cell lysis.
Studies have determined that cavitation is the phenomena behind sonochemistry. The process of cavitation is a result of conversion of kinetic energy from the oscillation of the probe to heat. This subsequently heats the contents of the bubble to impressive temperatures: experimental results have shown that these bubbles have temperatures around 5000 K!
Additional extreme physical and chemical conditions arise from high atmospheric pressure and rapid heating/cooling rates in the bubbles. When solids are present in the liquid samples, such as in those containing cells, cavity collapse causes high-speed bursts of liquid to the cell surfaces. These jets and accompanying shock-waves inflict damage on the already heated cells.
Not to burst your bubble, I do have to admit that sonication can have its drawbacks. As one might imagine, such high-energy processes do come at a cost: some of the cons of sonication include heating of your sample, potential variations in yield, as well as the generation of free-radicals that can react with other molecules. To avoid excessive heating, sonication is usually performed in multiple short bursts while the sample is immersed in an ice bath. The other caveat to this technique is that it needs to be optimized for your cell type in terms of time and power used.
You may need to sonicate the cells if they have relatively more rigid cell wall as it is true with the Rhodococcus sp. (bacterium) or nocardiform cells.
You didn't say which cells. However, if the objective is only western blot, there is no need to sonicate cells because boiling in Laemmelli buffer for 3 minutes should generally denature and release any type of protein.