Another great question, so let's look a bit further into the pros and cons of going to the gym, or working out at home.
Cost. Perhaps one of the more prominent factors in deciding which option is best for you, so we'll start with this one. Many commercial gyms are now starting to charge not only annually (usually the most cost effective option) but also monthly and even per session in some establishments, kind of like pay as you go rather than on contract. This has made going to the gym more accessible to more people. However, there are still caveats and small print to read which might mean that it is not quite as condusive as it looks, with some features or areas of the gym being out of bounds to anyone without a full membership. £10 per month for a minimum monthly membership right up to £800+ for a full annual membership is possible here. So, for the price of only one years gym membership you could consider purchasing one (or possibly even two) peices of domestic fitness equipment to use at home, maybe expanding your home gym further each year.
Convenience. This can go either way, one way of looking at it is that a home gym is right there right when you want to use it. You're not wasting time travelling to and from the gym, waiting in line to use a particular piece of equpment nor do you have to pull every ounce of enthusiasm together to bring yourself to go out in the freezing cold rain and get to the gym mid winter. Instead, simply nip up the the spare room, garage or back of the living room and away you go on your very own personal gym equipment - without having to worry about who's been sweating on it before you (ughh). Then, there's the other view. Some people thrive on the buzz of the gym, being with other like-minded individuals looking to acheive the same goals as you, it can spur you on and dependant on which package you opt for, you could find a greater range of apparatus at you disposal than what you can fit in at home.
Confidence and privacy. This is a one way or the other situation, not an either or. Some people lack the confidence to spend any amount of time around other people, let alone perform in front of them. In this case, being able to workout at your own pace and without judgement is a gift. You can set your own regime, adjust the ambient temperature to how you like it, listen to your own music (or not) and have your own shower room. If this reason is a factor in your decision wether to go to the gym or not then the other reasons above are irrelevant. At least for the moment anyway.
No gym? This may be an obvious one, but unless you live or work in a town or city then there's a possibility that your nearest gym is simply out of the question due to distance. Enter the home gym.