The question of whether you should weigh food raw or cooked depends completely on the items you are selecting in the food database. Some items explicitly state that the nutrition information is based on a cooked weight. If the item is not saying cooked, you can assume the nutrition information is based on it’s raw weight and you should therefore you should weigh it that way. Typically, the nutrition information on packages is based on as food is packaged.
Please keep in mind that if you choose to weigh foods cooked, there is more chance of error because different cooking methods can change the final weight. If you want to be as accurate as possible, you should probably weigh foods raw.