If you are speaking to someone, always use 马上.
If writing, you can choose to be formal or informal but most likely will never need to use 立刻. It is good enough that you understand it when you see it.
Source: lived in China for seven years, speak fluent Mandarin and never had to use the word! :)