I my view, for less cells, you could skip the sonication step and boil your sample with 1XSDS loading buffer.
However,If you try to harvest a lot of cells and resuspend them in a relative small volume of lysis buffer to increase the protein yield, you may want to break open the cell and shear the DNA/RNA by sonication, otherwise your cell lysate would be very sticky and may lead to ugly band in your SDS-PAGE gel.
It really depends on the cell type. Cells with a cell wall (yeast, bacterial, plant) may need disruption by sonication. Eukaryotic cells are readily solubilized and prepared for SDS-PAGe using sample buffer and heating.
I agree with all posted here, with the minor addition that some cell types are very inefficiently lysed by sonication (including yeasts and plant cells) and require the addition of lytic enzymes and/or shear enhances (ex. glass beads, which sometime remove proteins and necessitate other methods). On more generic and delicate cells sonication can work very well for immunoblotting, but chemical methods like SDS are usually much less labor intensive and give higher throughput.