For Tornado: first, get Apple's XCode (it's probably on your OS installation DVD, or get the latest from ADC after signing up for free to Apple's Developers Network) and install it.
Then, follow all the simple steps at the Tornado site, i.e.:
- download the tarball
- open a Terminal.App (Application/Utilities) and cd to the directory where you downloaded the tarball
- tar xvzf tornado-0.2.tar.gz
- cd tornado-0.2
- python setup.py build
- sudo python setup.py install
Optionally also sudo easy_install setuptools pycurl==7.16.2.1 simplejson
to get all the features of Tornado, as the Tornado site's instructions also mention.
For lighttpd: please open a different question -- that's fundamental SO etiquette. One question per question is by far best: how would anybody else guess from your question's title that answers also contain information about lighttpd, or other different tools yet?!