It's a programming language. you only need it installed if you are using something on your computer that is written in java. openoffice is probably the best known thing that is written in java (I need it for a music player I use) but if you don't use anything written in java then it's not needed.
It shouldn't be confused with javascript which is part of your browser and used on websites.
If you remove it and you find something doesn't work it will say it needs java and it's a 5minute job to reinstall it.