I wrote a small program to implement a web server with a JSON/HTTP interface for accessing I/O pins on the Arduino.
Of course to use this you have to have an Ethernet shield (wired or WiFi) on your Arduino; a standard bare Arduino by itself has no network interface. But if you have the shield, then this software gives you a network-ready interface to the analog and digital I/O capabilities of the board.
You can, for example, do a GET on /v1/analogRead/5 to read pin 5 from your Arduino, or POST a JSON object to /v1/digitalWrite to set a pin HIGH or LOW, etc. See the README file at https://github.com/outofmbufs/arduino-json-IO for details and source code.