Assuming you have a property (or computed, or data) which holds the information on whether the user is currently editing their profile (let's name it isEditingProfile), just provide it to input's :readonly, like so:
new Vue({
el: '#app',
data: () => ({
isEditingProfile: false,
username: ''
})
})
<script src="https://v2.vuejs.org/js/vue.min.js"></script>
<div id="app">
<input v-model="username" :readonly="isEditingProfile">
<label>
<input type="checkbox" v-model="isEditingProfile"> Is editing profile
</label>
</div>
Note: I've made isEditingProfile editable here to showcase it's working. In your app, link it to whatever logic should control it. Most probably, you need a computed for it.