if you are using the info in the spark database, most of those weights are cooked weights, so you should measure the cooked weight of the food.
if you are using the info from the package, that info is for the item as it is in the package [so if your meat was raw, it would be raw weight, if your pasta was uncooked, it would be uncooked weight], so you would measure before cooking.
with things like pasta it can be easier to weigh out 2oz dry and then split the yield into 2 portions once it's cooked. weighing raw also works well in dishes where the final product is mixed up with a lot of different things [soups, stews and chilis for example].
if you're ever in any doubt, check out nutritiondata.self.com
. they also use the usda info, but they really spell out what is included and how it is prepared. spark, for example, only lists scrambled egg, which has more calories than a plain egg. this site explains that the difference is that scrambled eggs include milk and oil/butter/fat.
-google first. ask questions later.