The answer inevitably depends on local conditions. My answer assumes you already have grid power. If you have to pay for lines to your place then I think off grid is a no brainer.
Here in Ontario, you can go grid tied by paying $30 grid access fee each month. That lets you use the grid as your battery. You might think well to hell with that I'll buy my own. Well if you budget $10,000 for batteries the monthly interest on that would be $41 at 5%. So financially going grid tied saves you $11 a month. Not a ton of cash but every penny counts. Plus maintaining batteries is one less thing to worry about. You dont have to worry about running out of power when its dark and cold in January and all of the nice clean electricity you produce is used either you or the grid when you have surpluses in summer.
What about from an environmental perspective? Most of my energy use (85%) is in evenings and weekends when sun is not shinning (why does it always rain on Saturdays! haha). In Ontario we have our baseload electrical needs met by nuclear and hydroelectric. Both are low carbon energy sources. During the day when demand is at peak natural gas fired plants are used -- cleaner than coal but still emit CO2. It would seem to me that every watt of clean solar power my panels will produce would offset the need for a watt produced by nat gas and reduces CO2 output. When I come home my grid produced is low carbon nuclear and hydro. So if I were to go off grid my pannels would replace very low carbon energy (off peak grid) with no carbon solar. But if I went grid tied my panels would replace higher CO2 energy with no C02 energy so I think in the fight against climate change going grid tied is a bit better. Plus it makes financial sense, in Ontario anyways.