Check out Resources for portable shell programmingResources for portable shell programming.
For Solaris specifically, the biggest gotcha is to make sure you have /usr/xpg4/bin or /usr/xpg6/bin ahead of /usr/bin on your PATH. The utilities in /usr/bin are backwards compatible with the pre-POSIX era. The utilities in /usr/xpg4* are compatible with Single Unix (v2 and v3 respectively). IIRC there are a few shell built-ins that change their behavior depending on the PATH too.
If your scripts are using bash constructs, you'll have to adapt them to run under ksh instead. Bash and ksh have a large common subset that contains many useful features that aren't in POSIX (arrays, extended glob patterns, [[ … ]], <(…), …). You can run ksh on Linux too; most distributions have it as an optional package, and you can download the source from the official site, or from more usable places.
The LFS site has installation instructions.