My DDs are 13 and 17 and I'm lucky enough to be really close to both of them :)
The 17 year old in particular tells me anything and everything. She's been extremely easy to parent so far but I'm confident our relationship would come through even stickier waters fine.
Throughout their childhood, I've always been interested in their crazes and interests. From Teletubbies when DD1 was a baby to Pokemon and Skylanders for DD2 now, I try to really listen and appreciate what they like and why.
When they were young I always answered anything they asked, without judgement or embarrassment. Friends often used to clam up if their DCs asked something a bit near the knuckle in public, used to say "I'll tell you later" or "when you're older" or "ask your dad". I never did that. DD1 asked about periods very loudly in a public loo at only 4 and asked what a prostitute was in front of family at 8. I always answered as if she'd asked me why the sky is blue. I think this gave her the impression that there were no "no-go" areas and it's something which has continued to this day.
I make a really big thing never to act shocked, even if I feel it. DD1 once told me she was planning to cheat in an important test. It would have been easy to launch into a lecture but instead I just said "OK...but just make sure you've thought it through. How will you feel if you are caught? How will you feel if you aren't? Which would make you happier, getting full marks by cheating or 2/3 marks on your own?" She worked it through in her mind and in the end didn't do it. I always let her think her decisions were hers - and in the end she seemed to take the right ones.
As they get older, the opportunities for being shocked get greater (!), but I still think that being unshockable is one of the key things for a close relationship. As a result DD1 tells me all kinds of things she openly says her friends can't tell their parents. I know who of her friends is having sex with who, who has tried drugs, who gets drunk on a regular basis. She tells me all her hopes and dreams and fears. DD2 today was telling me that she had been bitchy with one friend about another yesterday and how she regretted this a bit. I listened and let her talk it through, but didn't lecture. I figured she knew for herself she'd been mean or she wouldn't have been telling me. Somehow talking to me about all these thing seems to have kept them very much on the straight and narrow.
We always laugh that DD1 can only think of about 5 instances in her life when I told her off. Yet the funny thing is she's actually grown up with very firm boundaries in place. From 11-16 she had a monthly allowance (as DD2 still does) and I made it very clear that this would be stopped immediately at any hint of drugs/ smoking/ drinking etc. She's grown up with firm, clear rules and logical consequences to actions. I think they need those sorts of things for security.
I think letting go in stages and gradually giving independence are important too. Now DD1 is not far off 18, I really feel my job is done and all those kinds of decisions are hers to make. That's a good feeling :)