vi does not support arrow keys in insert mode. Use vim. Although your vi may just be a link to vim, it may be configured to behave like the "original" vi and thus disables the arrow keys. Just invoke vim directly.
I presume you're using vim as this is tagged as Linux. Try:
:set nocompatible
(You may want to configure your .vimrc with this by adding this command to it. Create a new .vimrc file if not already present in your home directory, run echo $HOME to check home directory path.)
Yet another variation: this problem appeared for me after some .vimrc changes. A concerted search eventually revealed that my clever re-mapping of ESC in normal mode was not a good idea. Removing it solved the problem:
" this is NOT something you want in .vimrc:
" In normal mode, hitting Esc turns off search highlights:
nmap <ESC> :nohl<CR> " Do NOT add this to .vimrc