Is it possible to set block weight inside template? I display some blocks using context module and others using template. Is it possible to set block weight inside template?
Block weight is stored in the database. There are functions to change their weight, but templates aren't the place for manipulating database data, that's where you write the HTML out. 

If you want to display context blocks in a different order from the blocks in the system UI, use the "Show row weights" link to set a value that's higher/lower than the value in block admin UI.