Simply, we use 'be going to' for our intentions and future plans. We also use 'be going to' for predictions that we are fairly certain about. Finally, we use it for giving commands especially to children.
Will is more for talking about things we are very certain about. Will can be used for making predictions about the future, especially about things we know always happen. We use will for making on the spot decisions, we've decided on right at this moment.
Examples with will:
- It'll be a nice day tomorrow.
- I think France will win the 6 Nations rugby tournament.
- I'm sure Alex will enjoy the book.
Example with be going to:
- I'm going to walk to work today.
- They're going to visit their grandmother in York.
- He thinks it's going to rain later.