Currently it is possible to use a variable value, but not to change it while a task is running.
This would be useful to allow one Task/Stage to store a value in the server so that other Task/Stage can have access to it.
Atlassian answer
Modifying global and plan variables will not be implemented due to concurrency issues that would be created.
However, since Bamboo 5.7 you can use Inject Variables task to add variables to "result" scope and use them later on, in subsequent Task, Stages and to create deployment release.