user7356: I am a rookie in chess. I can't understand why castling is needed. 
In what scenarios is castling useful?

user3182: Castling is good and very effective tool.
Use it at proper time. Don't go by default (starting point). You have to plan your game accordingly.
It will close the door and put king in very secure place. But remember most secure place is also most dangerous, as now king moving block is less.
And you should keep it in habit of playing with castling. And you'll soon learn its advantage.

user7397: Just for practice my brother and I would take turns opening with a castling as soon as possible. While the other practiced attacking the position. This was an effective challenge to developing both of our skills in defending and defeating the move. 
I do think too often many players use castling as an escape from attack. IMHO this is only a prolonging of the inevitable. It may prolong the game and a good player can easily continue an attack when castling is used to escape. 
Castling should be planned as an element of defense in the overall game. The most obvious factor is to which side to castle. Often based on the attack approach of the opponent.
Just FYI, for some damn reason I prefer the King's side. Would be nice to see a vote on this. And tie it to right handed and left handed persons. 

user7467: Here is a simple rule: Always castle until you are sufficiently strong to understand when not to castle. When you are castled, do not move the pawns in front of your king unless you have a very good reason do do so. 

user3540: It's also important to note that castling is not always required. Once you reach about 1800-2000 level, you'll start to see that in certain (closed) positions, like in some variations of the French, moving the king up and manually connecting your rooks may be required/favored. However, even in those positions, castling is generally a good idea.
The only reason you wouldn't castle is if the position is very closed and you have a specific role for the king that wouldn't cause it unnecessary danger and/or if your pieces are on the other side of the board and you can defend your king better if it manually shifted over by a square or two.
However, this requires deep positional understanding and tactical sacrificial understanding (your opponents potential sacs), so as a general rule, I'd advise for castling. 
However, develop your pieces to take key squares away from your opponent first, then castle. Don't castle just because you can, but because you should. However, in the opening, sometimes other priorities are more important, like a crucial square, winning a piece, forcing your opponent to play other moves to gain tempo, etc.

user5852: Castling is good for protecting your king.
It's good to castle your king early in the game.
Castling is good for getting your king out of the center.
Castling isn't mandatory, but it is ideal to castle.
Also Castling helps to get one of your rooks activated.
I hope this helped you!

user7245: Castling is a way of strengthening your King for its' defensive position and Rook's position for its' attacking position(Coming to the game)
Types of Castling
King Side denoted by O-O since the King is moving two squares towards the King-side Rook.
Queen Side denoted by O-O-O since the King is moving two squares towards the Queen-side Rook.
When not to castle
Legal Check

When your King or Rook has moved earlier
When the King is under check
When the square the king will move to or move over is attacked by an enemy piece

Why to castle
Strategy Check

If you want to go with attacking mindset, wait for the enemy's end to castle and do the castling on the alternative end of your side. Push the pieces and target his weak squares protecting the King i.e. The three pawns protecting the king.
If you want to play with a defensive mindset, cover all your pawn structure ahead of king with Knights and Bishop.

General tip: Move the a-file or h-file pawn in case of a waiting move for the King to escape back rank mate at the later stage.

user7380: I castle in most games, but I'll be a contrarian and mention when/why I don't like to castle...
When/why not to castle:

to use the tempo for something else I think a lot of people castle too early, often using it as a "well I don't know what to do next" move. Think about what you'll want to do after you castle, and see if there might be a tactic that might benefit from having a move earlier. Alternatively, think about what your opponent wants to do next, and thwart their development/tactic.
to make your opponent commit to an attack By waiting to castle, you can sometimes force your opponent to commit to attacking either king side or queen side before they know where your king will be. I find this especially useful in games where I've dominated the center, since then the opponent needs to take more time to move pieces to the opposite side (when I castle away from their development). Note that it's easier to get that domination with the extra tempo you get from not castling.
to make your opponent more aggressive Often, seeing you not castle, an opponent will try to "punish" you for your indiscretion. If you get experience with people trying to punish you for not castling, you'll have an advantage and might find some fun tactics to use to punish them for punishing you
when the game is simplifying fast If, for whatever reason, pieces are leaving the board in a hurry, having your king in the center of the board can give you an advantage in the endgame--your king is only a few moves away from most of the action.
for a variation on your opening If you want to mix things up in an opening, try not castling and see what sort of attacks that gives you.
if you want to use your rooks in the corners of the board to attack h4 is a common move to attack a castled black king, but obviously it's much weaker if you castle king side. a4 can also start an interesting queen side attack, and sometimes the options of both of these attacks can outweigh the extra flak your king may get in the center

To answer the actual question...
Why castle:

the side of the board is the best defense for your King If your king is in the corner, there are only two directions attacks can come from. In the center, there are three directions. This simplification can make defense easier.
it's easier to see attacks coming This is closely related to the above; a knight in the middle of the board might be one move away from check while also controlling the center and threatening an exchange or two. If your king is still in the center, it's harder to know what your opponent is thinking. If your king has castled, they have to commit their pieces to a side to attack it, so you can identify your opponent's intentions more easily.
connecting and activating your rooks Activating your rooks is good; connecting your rooks is better. With connected rooks (rooks that defend eachother), you can start putting rooks on contested open files and get to worry a bit less about the exchange.
to throw your opponent off Castling is the only move where two piece move at once. Additionally, your most important piece is moving at double its normal speed. If your opponent is attacking your defenses based on where your pieces currently are, castling can instantly drastically change your configuration. It can neutralize a double-attack to f2 while also removing a c3 pin (perhaps your knight with a black bishop behind it). Used well, you can waste a few of your opponent's moves in one fell swoop.

Some games to look at:

The Game of the Century I certainly didn't see Fischer's attack coming
Under the Cannon This is often considered one of the best examples of Alekhine's gun--notice how late white castled, and how black tried to get his king back into the action quite a bit later. And notice how castling made black's queen misplaced. Also, of course, it's known as an example of an impressive use of activated rooks.
Fischer v Spassky Look at how Spassky started a strong attack before castling, and also how Fischer punished him for it. I think Spassky's attack was brilliant, and a good example of why one might wait a bit to castle, but Fischer is obviously brilliant too and great at pursuing even the smallest of weaknesses in his opponents.

I'll add inline games when I figure out how to do so

user3529: Castling is extremely useful in almost all games.  It lets you do two things at once.  First, it moves your king from the center to the side of the board, where it is much more difficult to attack for the opponent.  Second, it brings one of your rooks towards the center of the board, and it crucial in bringing both of your rook into the game.
There may be a number of potential reasons why these points might not make sense to you. Here is an (incomplete) list:
a) you do not feel that the king is in danger in the center
b) you feel that the danger on the side of the board is the same
c) you feel that activating the rook is not too useful
For a) you should probably have a look at how to attack if the king stays in the center; develop, try to rip open the center e.g., by advancing (even at the cost of sacrificing) some pawns in the center.  Once you find out how to do this and also experience how it feels being torn apart by such an attack, you will appreciate being able to quickly move the king out of the center.
For b) it is important to understand that, generally, the initial pawn positions on the 2nd/7th rank are the most resistant.  It might be that you unnecessarily weaken the protection of your king by pawn moves here.  Also you should have a look at some standard motifs, such as the classic bishop sacrifice (google the keyword).  Avoid such configurations and do not push the pawns in front of your king too much and you will soon realize that the side of the board is a much safer place to be.
Finally, concerning c), it is a sad truth that many players do not use all or even most of their pieces.  Having a rook stuck in a corner essentially amounts to having a piece less; for attack and for defense.  You should strive to activate all your pieces and also to connect the rooks, possibly even double them on an open file.  For this, castling is the single most effective means.  All other ways to activating and connecting the rooks likely take both more moves and require additional, potentially weakening, pawn moves.

7356: <p>I am a rookie in chess. I can't understand why castling is needed. </p>

<p>In what scenarios is castling useful?</p>
 3182: <p>Castling is good and very effective tool.</p>

<p>Use it at proper time. Don't go by default (starting point). You have to plan your game accordingly.</p>

<p>It will close the door and put king in very secure place. But remember most secure place is also most dangerous, as now king moving block is less.</p>

<p>And you should keep it in habit of playing with castling. And you'll soon learn its advantage.</p>
 7397: <p>Just for practice my brother and I would take turns opening with a castling as soon as possible. While the other practiced attacking the position. This was an effective challenge to developing both of our skills in defending and defeating the move. </p>

<p>I do think too often many players use castling as an escape from attack. IMHO this is only a prolonging of the inevitable. It may prolong the game and a good player can easily continue an attack when castling is used to escape. </p>

<p>Castling should be planned as an element of defense in the overall game. The most obvious factor is to which side to castle. Often based on the attack approach of the opponent.</p>

<p>Just FYI, for some damn reason I prefer the King's side. Would be nice to see a vote on this. And tie it to right handed and left handed persons. </p>
 7467: <p>Here is a simple rule: Always castle until you are sufficiently strong to understand when not to castle. When you are castled, do not move the pawns in front of your king unless you have a very good reason do do so. </p>
 3540: <p>It's also important to note that castling is not always required. Once you reach about 1800-2000 level, you'll start to see that in certain (closed) positions, like in some variations of the French, moving the king up and manually connecting your rooks may be required/favored. However, even in those positions, castling is generally a good idea.</p>

<p>The only reason you wouldn't castle is if the position is very closed and you have a specific role for the king that wouldn't cause it unnecessary danger and/or if your pieces are on the other side of the board and you can defend your king better if it manually shifted over by a square or two.</p>

<p>However, this requires deep positional understanding and tactical sacrificial understanding (your opponents potential sacs), so as a general rule, I'd advise for castling. </p>

<p>However, develop your pieces to take key squares away from your opponent first, then castle. Don't castle just because you can, but because you should. However, in the opening, sometimes other priorities are more important, like a crucial square, winning a piece, forcing your opponent to play other moves to gain tempo, etc.</p>
 5852: <p>Castling is good for protecting your king.</p>

<p>It's good to castle your king early in the game.</p>

<p>Castling is good for getting your king out of the center.</p>

<p>Castling isn't mandatory, but it is ideal to castle.</p>

<p>Also Castling helps to get one of your rooks activated.</p>

<p>I hope this helped you!</p>
 7245: <p>Castling is a way of strengthening your King for its' defensive position and Rook's position for its' attacking position(Coming to the game)</p>

<p><strong>Types of Castling</strong></p>

<p><em>King Side</em> denoted by <code>O-O</code> since the King is moving two squares towards the King-side Rook.</p>

<p><em>Queen Side</em> denoted by <code>O-O-O</code> since the King is moving two squares towards the Queen-side Rook.</p>

<p><strong>When not to castle</strong></p>

<p><strong><em>Legal Check</em></strong></p>

<ul>
<li>When your King or Rook has moved earlier</li>
<li>When the King is under check</li>
<li>When the square the king will move to or move over is attacked by an enemy piece</li>
</ul>

<p><strong>Why to castle</strong></p>

<p><strong><em>Strategy Check</em></strong></p>

<ul>
<li>If you want to go with <code>attacking mindset</code>, wait for the enemy's end to castle and do the castling on the alternative end of your side. Push the pieces and target his weak squares protecting the King i.e. The three pawns protecting the king.</li>
<li>If you want to play with a <code>defensive mindset</code>, cover all your pawn structure ahead of king with Knights and Bishop.</li>
</ul>

<p>General tip: Move the a-file or h-file pawn in case of a <code>waiting move</code> for the King to escape back rank mate at the later stage.</p>
 7380: <p>I castle in most games, but I'll be a contrarian and mention when/why I don't like to castle...</p>
<h2>When/why not to castle:</h2>
<ul>
<li><strong>to use the tempo for something else</strong> I think a lot of people castle too early, often using it as a &quot;well I don't know what to do next&quot; move. Think about what you'll want to do after you castle, and see if there might be a tactic that might benefit from having a move earlier. Alternatively, think about what your opponent wants to do next, and thwart their development/tactic.</li>
<li><strong>to make your opponent commit to an attack</strong> By waiting to castle, you can sometimes force your opponent to commit to attacking either king side or queen side before they know where your king will be. I find this especially useful in games where I've dominated the center, since then the opponent needs to take more time to move pieces to the opposite side (when I castle away from their development). Note that it's easier to get that domination with the extra tempo you get from not castling.</li>
<li><strong>to make your opponent more aggressive</strong> Often, seeing you not castle, an opponent will try to &quot;punish&quot; you for your indiscretion. If you get experience with people trying to punish you for not castling, you'll have an advantage and might find some fun tactics to use to punish them for punishing you</li>
<li><strong>when the game is simplifying fast</strong> If, for whatever reason, pieces are leaving the board in a hurry, having your king in the center of the board can give you an advantage in the endgame--your king is only a few moves away from most of the action.</li>
<li><strong>for a variation on your opening</strong> If you want to mix things up in an opening, try not castling and see what sort of attacks that gives you.</li>
<li><strong>if you want to use your rooks in the corners of the board to attack</strong> h4 is a common move to attack a castled black king, but obviously it's much weaker if you castle king side. a4 can also start an interesting queen side attack, and sometimes the options of both of these attacks can outweigh the extra flak your king may get in the center</li>
</ul>
<p>To answer the actual question...</p>
<h2>Why castle:</h2>
<ul>
<li><strong>the side of the board is the best defense for your King</strong> If your king is in the corner, there are only two directions attacks can come from. In the center, there are three directions. This simplification can make defense easier.</li>
<li><strong>it's easier to see attacks coming</strong> This is closely related to the above; a knight in the middle of the board might be one move away from check while also controlling the center and threatening an exchange or two. If your king is still in the center, it's harder to know what your opponent is thinking. If your king has castled, they have to commit their pieces to a side to attack it, so you can identify your opponent's intentions more easily.</li>
<li><strong>connecting and activating your rooks</strong> Activating your rooks is good; connecting your rooks is better. With connected rooks (rooks that defend eachother), you can start putting rooks on contested open files and get to worry a bit less about the exchange.</li>
<li><strong>to throw your opponent off</strong> Castling is the only move where two piece move at once. Additionally, your most important piece is moving at double its normal speed. If your opponent is attacking your defenses based on where your pieces currently are, castling can instantly drastically change your configuration. It can neutralize a double-attack to f2 while also removing a c3 pin (perhaps your knight with a black bishop behind it). Used well, you can waste a few of your opponent's moves in one fell swoop.</li>
</ul>
<h2>Some games to look at:</h2>
<ul>
<li><a href="http://www.chessgames.com/perl/chessgame?gid=1008361" rel="nofollow noreferrer">The Game of the Century</a> I certainly didn't see Fischer's attack coming</li>
<li><a href="http://www.chessgames.com/perl/chessgame?gid=1012683" rel="nofollow noreferrer">Under the Cannon</a> This is often considered one of the best examples of <a href="http://en.wikipedia.org/wiki/Alekhine%27s_gun" rel="nofollow noreferrer">Alekhine's gun</a>--notice how late white castled, and how black tried to get his king back into the action quite a bit later. And notice how castling made black's queen misplaced. Also, of course, it's known as an example of an impressive use of activated rooks.</li>
<li><a href="http://www.chessgames.com/perl/chessgame?gid=1044390" rel="nofollow noreferrer">Fischer v Spassky</a> Look at how Spassky started a strong attack before castling, and also how Fischer punished him for it. I think Spassky's attack was brilliant, and a good example of why one might wait a bit to castle, but Fischer is obviously brilliant too and great at pursuing even the smallest of weaknesses in his opponents.</li>
</ul>
<p><em>I'll add inline games when I figure out how to do so</em></p>
 3529: <p>Castling is extremely useful in almost all games.  It lets you do two things at once.  First, it moves your king from the center to the side of the board, where it is much more difficult to attack for the opponent.  Second, it brings one of your rooks towards the center of the board, and it crucial in bringing both of your rook into the game.</p>

<p>There may be a number of potential reasons why these points might not make sense to you. Here is an (incomplete) list:</p>

<p>a) you do not feel that the king is in danger in the center</p>

<p>b) you feel that the danger on the side of the board is the same</p>

<p>c) you feel that activating the rook is not too useful</p>

<p>For a) you should probably have a look at how to attack if the king stays in the center; develop, try to rip open the center e.g., by advancing (even at the cost of sacrificing) some pawns in the center.  Once you find out how to do this and also experience how it feels being torn apart by such an attack, you will appreciate being able to quickly move the king out of the center.</p>

<p>For b) it is important to understand that, generally, the initial pawn positions on the 2nd/7th rank are the most resistant.  It might be that you unnecessarily weaken the protection of your king by pawn moves here.  Also you should have a look at some standard motifs, such as the classic bishop sacrifice (google the keyword).  Avoid such configurations and do not push the pawns in front of your king too much and you will soon realize that the side of the board is a much safer place to be.</p>

<p>Finally, concerning c), it is a sad truth that many players do not use all or even most of their pieces.  Having a rook stuck in a corner essentially amounts to having a piece less; for attack and for defense.  You should strive to activate all your pieces and also to connect the rooks, possibly even double them on an open file.  For this, castling is the single most effective means.  All other ways to activating and connecting the rooks likely take both more moves and require additional, potentially weakening, pawn moves.</p>
