The idea behind verses about the sealing of hearts appears to be the psychological law that if a person once does a good or an evil deed, his chances of repeating that kind of action increase and of doing its opposite proportionately decrease. With constant repetition of an evil or of a good action, it becomes almost impossible for a person to do the opposite, or even to think of it, so much so that while men's hearts become "sealed" and their eyes "blinded" if they do evil, their doing good produces such a state of mind that the devil himself can have no sway over it. Nevertheless, actions which create a psychological habit, however strong their influence may be, must not be construed as absolute determinants, for there is no "point of no return" for human behavior: genuine repentance (tauba) can turn an apparently wholly evil man into a paragon of virtue; on the other hand, although this is much more rare, an apparent paragon of virtue (even a prophet!) can turn into a near devil enmeshed in carnal pleasures .
Fazlur Rahman, Major Themes of the Qur'an
islam