Last year I was obsessed with playing Words With Friends on my Android phone. As I played I kept thinking how one might create an algorithm to search through possible valid words. It turns out that many other people have had similar thoughts, going way back to the 1980's. The classic Scrabble algorithm was written by two guys in 1988. You must read this article first before you waste time reinventing stuff that's already been done. Look for the journal article "The World's Fastest Scrabble Program" by Appel and Jacobson in Communications of the ACM, 1988. If you can't find it on your own, I have made available a PDF from my Google Drive: linky.
This work is not really complete since I got sick of playing Words With Friends before this software was done.