In the first position I woudn't castle at all. I would want to activate my king for the endgame. I doubt it is exactly sound or anything but in the second position I would castle queenside to storm the king with my pawns.
O-O or O-O-O?
I agree with mrguy888. Position 1 offers more flexibilty playing Kd2 or maybe even better Kf2, followed by g4. Position 2 queenside castle seems good.
In position 2, I'd rather castle kingside.
Black has somehow found himself ahead of white in development, and white has already castled kingside, so it might be natural to think, "castle opposite and pawnstorm."
But consider: IF you castle opposite, what are white's undeveloped pieces going to be up to? After ...0-0-0 and then white's b4, suddenly both white's queen and his dark square bishop find themselves in useful positions almost by accident.
Depending on black's replies, white has ideas of Qc2, Qb3 or even Qa4. Maybe Ba3 with the potential for a dangerous discovered attack on black's queen after a b5 push. Etc.
With 0-0-0, black takes the onus off of white to finish his development, and in a way, completes his development for him. In so doing, he goes from a pleasant opening advantage, to at best, something double-edged, where white has a simple strategy handed to him on a platter.
After ...0-0, black solidifies his position, and can prepare operations on the queenside or in the center, after, e.g., ...Ne4, or ...Na5 and ...c5. White's position in this "Colle" like structure has the twin downsides that it is passive, and it allows black to pursue his own agenda on that half of the board. Take what the position gives you, and don't bail white out after he hands you a gift.
Edit to add: the only real dangers for black in 0-0 lines against a Colle type setup are the aggressively placed light square bishop at d3, and the ideas of either an e4 push, or a knight parked menacingly on e5. Thanks to white's pitiful placement of his bishop at e2, virtually none of that is available to him. So black has less than nothing to fear on that side of the board. The more I look at it, after 0-0, it ought to simply turn into a positional crush.

When deciding where to castle (or whether to castle at all) you need to weigth in several things.
where will your king be safest: on the kingside, on the queenside or in the centre? This depends on the pawn cover around your king but also on how strong you are on particular area of the board, where the opponent is planning to attack or capable of launching a strong attack (where his pieces are directed, are there open lines or possibilities to quickly open them with pawn storm or even with piece sacrifices etc.).
The activation or your forces. Besides protecting the king the other function of castling is to help develop your pieces (particulary the rook with which you castle).
Is the timing right for castling? Is taking your king away from the centre urgent? If not perhaps there's something more usefull to do. If the king is under serious threats or castling is the logical way to continue developping your pieces then it's right time to castle.

As an example let's see that second position.
You have good pawn cover on both wings. For white it will be much harder to attack on the kingisde because his own king is there. So, kingisde would be safer your king.
But whatabout your own plans. If you want to attack white's king, it would be difficult with your own king on the kingside. Therefore, if you castle kingside then both kings will be safe whereas castling on the queenside leads to a race between mating attacks on the different wings which has to be evaluated carefully.
In the continuation 1... 0-0-0 2. b4! white gets his attack quickly going. He has possibilities to play b5 with a tempo, perhaps a4+Ba3 using the vulnerable placement of black's queen and also Ne5 (after driving Nc6 away with b5). Black's attack on the kingside takes much longer to organize. Therefore 1... 0-0-0? looks like a mistake.
Perhaps 1... 0-0 is better but what we really should ask ourselves is is castling really urgent? The centre is quite closed at the moment and if needed you have the option to quickly evacuate your king in any direction. Therefore your king is very safe for the time being and we can see if there's something more usefull than castling.
Maybe black could play 1... e5 opening the diagonal for your bishop in d7 while leaving the decision about castling later. If 2. dxe5 Nxe5 then long castling might be considered later because with the centre open white's pawn storm on the queenside will not be as dangerous anymore (there should be counterplay in the centre)

If you can castle both ways, then castle kingside always.
Obviously, there is some exceptions for castling queenside or not castling at all, but in most of your games, you should O-O.
The reason why its preferred kingside is because that you only need to get your king's bishop and king's knight out whereas when you have to get you queen's bishop, queen's knight AND your queen to castle queenside. That is 3 moves against 2! The other reason why you should castle kingside is because you also have to spend an extra move protecting the hanging a-pawn with your kings or any other piece.
I hope this helps!

Only if you blunder it.

Tips for Beginners:
Never castle on a side with an open file
Castle on the side with more pieces defending
Don't castle on the side with many enemy pieces attacking
Figure out if castling leads to checkmate
In closed positions, a king should castle (unless you are a GM, and you know how to defend)
I hope that helped

If you can castle both ways, then castle kingside always.
Obviously, there is some exceptions for castling queenside or not castling at all, but in most of your games, you should O-O.
The reason why its preferred kingside is because that you only need to get your king's bishop and king's knight out whereas when you have to get you queen's bishop, queen's knight AND your queen to castle queenside. That is 3 moves against 2! The other reason why you should castle kingside is because you also have to spend an extra move protecting the hanging a-pawn with your kings or any other piece.
I hope this helps!
Honestly, you are a 500 rapid and 900 blitz, so I don't think you should be saying that kingside castling is better than queen side castling. Although I would also probably castle kingside here, I would just like to point out that kingside castling it NOT always better than queenside castling.
Hello ..
The question is : should I castle to kingside or queenside if both are available in the same time?
Some beginners don't care and would castle in any direction but others will ask this question to unveil the hidden factors to decide ..
For example, in a blitz game for beginners and after equal trades, the position may look like this:
Moreover, others may face something like this position:
I think in some positions, there would be some slight differences but in some other differences, the difference would be fatal
Is there any guidelines for this decision?