It depends on the position, in certin instances it can actually hurt you. It is part of opening thery though and is much better than keeping your king in the center. Personally I will trade queens every time if it prevents my oponent from castling.
castling point value

I would consider it about 1 pawn :)
So usually sacrificing a minor piece for a pawn on f7/f2 is usually not a good idea (except in bullet :P), but if you can prevent your opponent from castling without loss of material, definitely do so.
Of course, this doesn't apply to every position, but I find it to be a good rule of thumb. Hope that helps!
if there was a point value to be put on the ability to castle, what would it be?