Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
There's no official API to look at general device settings such as these.

On a Jailbreak'ed iPhone, you could just read the settings directly from the appropriate .plist file.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.