Extremely important to protect your king. It also releases a rook.
The only reason not to castle is for the tempo to try and attack your opponent before he attacks you. But it is much easier to attack a king in the centre then a castled king. I try to castle kingside when no pieces are under attack at the first opportunity
I have put this post in the forum 'Chess Openings' as, just about always, castling occurs in the opening stages of the game once specific pieces have been moved out of the way, pawns, knights, bishops..
However, what are the actual benefits to castling? Personally, I don't like the idea of leaving my king locked in a corner of the chessboard. Howeve, most games that I have seen of professional chess players, both on chess.com and on international matches castle. Why?
When should I castle? Why should I castle, or, perhaps, when should I not castle?
Thanks in advance