Jpg stores each pixel as a set of three values (red, green, blue) between 0 and 255 (8 bit), whereas raw files store values between either 0 and 4095 (12 bit) or even 0 and 16383 (14 bit). 0 = black, and 255, 4095 or 16383 = white, so raw files are able to store information over a much greater dynamic range - even areas that look black in a raw file can contain many more shades than in the entire range of a jpg.
Raw files store exactly what the camera sensor saw when the exposure was made, which can include chromatic aberration (when different wavelengths of light are refracted different amounts so a single ray of light may land on multiple pixels) and vignetting (when pixels at the edge of the sensor get more or less light than those in the middle) and other issues to do with the fact that each pixel in the sensor is only sensitive to red, green or blue, but not all three.
The camera takes all these things into account when it converts the raw data into a jpg (therefore throwing a lot of data away in the process). If you want to work with raw files you have to correct for these things in software. Software like lightroom will do all these corrections as well as letting you boost dark colours and reduce light colours all into a range that could be saved in a jpg (although data will still be lost). Alternatively you can make the corrections and save as tif which allows 16 bits so no data is lost and these can be read by photoscan.
According to Martin, photoscan can work with canon raw files without any such processing or conversion, which is great, but it doesn't work for me with Nikon or sony raw files

I don't know if you would get much improvement in results by using raw files or not. It can be useful if you have more dynamic range in your scene than can be encoded in a jpg file, I.e. areas in shadow and direct sun. It's worth a try though to see if it's worth it for you, and its definitely good knowledge to have in case you do need it one day!