Chess would be a dull game if it could be reduced to simple rules. I must offer the unhelpful answer that every position is unique and requires its own evaluation. A couple thoughts. I sometimes castle routinely out of laziness in a position where castling is an obvious improving move, but I should look around and see if a better move is available. We should try to avoid making obvious moves hastily. In some positions it is not clear if your king is better off on kingside or queenside or left in the center. In that case it is often better to keep your options open and not make a committal decision. On the other hand, if your opponent has good piece activity and possibilities to open up the position, you probably don't want your king in the center.
when is the right time for castling

Thank you patzermike, you have really addressed the issue. I often make such move out "it's obvious and common move" not really tactical.
Nice! Is that your proverb, or are you quoting someone.
Lagomorph wrote:
"Castle when you wish, or when you must, but never castle simply because you can."
I understand the proverb to mean what I was saying. We shouldn't castle just because we can and are too lazy to look for better moves.
TunjiGold wrote:
Lag, please explain your statement "castle when you wish, but never castle simply because you can.
I often get into great trouble after castling. Probably I made the castling too early or too late. Please when should I castle.