It's really hard to take pictures of the NSA and I wish I was joking. When you drive past it, on say MD's Route 100, there are signs stating not to stop or take pictures and police officers with their lights on at all times on the side of the road. You can't stop here unless it's an emergency. I'm not sure about the laws that back this up but I've never tested them.
It's probably not a good idea to stand outside GCHQ's fence and take photos. They'll claim it's to protect secrets - the privacy and secrecy of who works for them, for example. (Because there is mostly carpark between the doughnut and the public road). I don't know if someone would get arrested, but "they" would certainly feel able to use their anti-terror powers and the experience would not be pleasant.