I want to know if it's alright to ask for pay hike just because I'm
changing location.
Assuming you didn't request the transfer yourself, it's perfectly reasonable to ask for an increase due to the change in cost of living in the new location.
And what should be the right way for asking for a pay hike ?
Just ask.
Something like "Boss. The new location you are transferring me to has a much higher cost of living. I'd like a pay adjustment so that I'm not unfairly burdened in the process." (Ask for an "adjustment" rather than a "raise" - it sounds more appropriate for the context.)
You could even go online to a cost of living calculator site like http://money.cnn.com/calculator/pf/cost-of-living/ (or your local equivalent) so you'll know how much you should ask for if the question arises.
Remember, the fact that you were living with parents and now won't isn't the company's problem here. They may make an accommodation for that, but probably not.
Then listen.
Often, companies have money set aside for such purposes. But sometimes, they expect attrition, and are willing to let folks who don't want to bear the increased costs leave.
You will only know by asking.