I was pretty much raised in a secular environment until I was about 10, at which point my family began attending a mainline Protestant church and I converted (officially) when I was I believe 13 (or 12...either way it was a sham conversion; I was at best an agnostic at the time). Before this my family was non-religious and, in the case of my father at least, atheist. I withdrew from our newly claimed religion pretty quickly, and began attending a Unitarian Christian congregation while my parents attended the mainline one. That was when I was first exposed to higher criticism, and no semblance of Christianity survived that particular form of secular baptism. By 16 I was an atheist, which I remained for over a decade. I remember the day that I realized I was an atheist very vividly, because I was overlooking lilac bushes being moved by the wind and had a strange sense of peace and contentment, thinking about the awesomeness of evolution, biological and cosmic, and its production of the world around me.
I began to feel differently, somewhat unexpectedly, when I was about 27 to 28. First with an examination of Buddhism, which I thought might be more palatable to me because it did not have any kind of theistic tendency. I was also somewhat familiar with it because my uncle had practiced Buddhism. However, as I began practicing meditation and yoga I became much more open to the possibility, until I had a kind of sense of God, although not as I had understood God in the past. Similar to the lilac experience, I suppose, but different.
Four years later, I am only recently giving serious thought to worshiping within a community in any way. But the major problem with returning to the tradition I was raised with (more or less) is that I don't accept that tradition and I don't find it spiritually fulfilling. I've been studying Judaism and attending classes and services at a nearby synagogue, which is certainly not something I was raised with and is very far afield from the tradition that I am accustomed to, but my first Shabbat service was also one of the most powerful experiences I have ever had in a communal religious setting.
The importance of prior experience shouldn't be overlooked; clearly, geography and family history are very good predictors for religious affiliation and belief. But it is not always the case.