For the most part, if your distribution uses a sane package manager, whatever it defaults to is probably where it's supposed to go. For the most part, applications get thrown in the /usr heirarchy, with binaries in /usr/bin, libraries in /usr/lib, documentation in /usr/doc, and so on. Configuration files like to show up in /etc, regardless of where their applications are installed. Proprietary packages have a tendency to hide in /opt just to make things interesting.
A quick rundown on your specifics:
- Apps tend to be installed in
/usr/bin, /usr/local/bin, or in some cases /opt. If you're developing your own software, or custom modifying an existing package, /usr/local/bin is probably your best choice. Otherwise, use your package manager's default.
- Development tools should be treated the same as any other applications. See 1.
- Again, AMP applications should be treated the same as any other applications. See 1.
/var/www is the most common, but /srv/www seems to be gaining momentum. Depending on your system, the two may be symlinked together anyway. You should probably use whichever one Apache defaults to for consistency. User-specific webpages would go in ~/public_html regardless.
Check out the Filesystem Hierarchy Standard if you want further details and rationale thereof.