While doing any dumbbell or barbell exercises, is it okay to place the thumbs 'outwards' instead of curling them on the grip? For instance, when doing a hammer curl, can I put my thumbs outwards, inline with other four fingers? What is the recommended position of thumbs in dumbbell or barbell exercises? I am asking this question because in my case it hurts a bit near right forearm vein near wrist if I keep my thumb in curled position while increasing weight in further sets.
That 'outwards' sort of grip is commonly referred to as 'suicide grip' for obvious reasons. While it may not be dangerous on many exercises, on the Bench Press for example it can be very harmful (even deadly, hence the name) to use it. With this grip it is way easier/more likey that the bar just slips out of your hands crushing the whole weight onto your chest.
I would recommend you use the 'regular' grip (thumb around the bar) on the Bench Press and other exercises that might lead to injury if the bar slips out of your hands. For the rest I would say go for whatever grip feels most comfortable to you.
Also worth noting: Many lifters use the suicide grip on pulling exercises, because they fee like it takes away the emphasis from the biceps and on these exercises there is not much risk of injuring should the bar slip out of their hands.