1) Did you patch the game?
2) Did you install the "high-quality" movies patch?
3) Is 640x480 among the supported resolutions in your graphics driver control panel?
4) KotOR 2 supports 1280x768 natively. All you have to do is change the width and height values under both [Display Options] and [Graphics Options] in the swkotor2.ini file.
"Mind your wants, 'cause someone wants your mind."