My opponent just sent me a message saying "I was sure you'd play BAGS for the win." How did she know I had a G and an S left?
It sounds like you were near the end of the game, and Words With Friends games consist of the same tiles in every game.
There are programs like this that can calculate what tiles are remaining that you don't have, based on your hand and the board state. Towards the end of the game, this will let you know exactly what hand your opponent has.
Near the end of the game, when the tile bag says Zero, you can actually click on the tile bag feature and there are letters in there... they are your opponent's. Sometimes it may be a little different, but based on many games I've played you can pretty much tell what they have at the very end. I guess it's not too cool to know, but you can. Actually, they should fix that. After all, it's hard not to look if you know that; and you will be tempted to play so they can't use their letters to score the highest points.
They can't see your letters, and without seeing the board, I'd assume that they went with a worse case scenario on their part. Since BAGS gives nine points on it's own, I'll take a guess that it was going to either lead to a double or triple giving you 18 or 27 points respectively. Not to mention since it's a short simple word, you're more likely to have it pop out at you for a quick win.