Let's start with cost.
Most people think that working out at home is about saving money, but that's not entirely true. If you've looked at the prices for home gym equipment then you know that you can go to the gym for years for what a weight bench and some free weights will cost you. If money is the issue, you're either going to have to exercise without weights, or find a gym that you can afford, unless of course you've inherited some equipment or bought some used for cheap.
Your personality is going to have a lot to do with it as well.
Are you self motivated? If you are then you can probably maintain a regular program of working out at home. If you need outside motivation then a gym can help. Paying the monthly dues can even remind you to get up and go. Seeing the same people at the gym encourages you to not miss your days. There's something about a routine (i.e. stopping at the gym on the way home from the office each day) that is really important for some of us. Some people who are more social or like to be around others when they work out will also prefer the gym environment.
That's about where the benefits of joining a gym end.
If you want more variety, you should come up with your own routines that involve things like running, cycling, swimming, etc. Sure you can take classes at the gym, but that can add another expense if they are not already included in your membership. You can try a workout series on DVD like P90X or Insanity and get the same result.
You also get the outdoor bonus when you don't use the gym.
Sports like tennis and beach volleyball can offer you nice outdoor alternatives to going to a gym. There is also hiking (you can make it exercise if you take it seriously) and speed walking.
Should you opt to work out at home.
It offers you a quiet and private environment if you just like to be alone with your thoughts when you work out. You can put the cell phone away just as easily at home as you can leave it in a locker at the gym. Crank up your tunes instead of having to use earbuds that get all tangled up in the machines.
The key is to figure out what works best for you so that you will stick to it.