Yes it can.
There's nothing in the rules, or either spell, which says that the material component used for one of these spells can't also be used for the other. The gem isn't consumed by either spell, and as long as the gem meets the requirements for both spells in value and size, you should be able to use it for both.
However, note this wording:
Light can pass through the gemstone normally (allowing the target to see out and other creatures to see in), but nothing else can pass through, even by means of teleportation or planar travel.
This implies that your soul cannot travel into and out of the gem while Imprisonment is in effect. So if your soul is still in the gem, you can't possess a creature until Imprisonment ends. Likewise if you have possessed a creature, your soul cannot return to the gem until Imprisonment ends.
Fortunately, Imprisonment allows you to set a condition for ending the spell:
The condition can be as specific or as elaborate as you choose, but the GM must agree that the condition is reasonable and has a likelihood of coming to pass.
So you could set the condition that Imprisonment ends, for example, when the body you're possessing through Magic Jar dies. Work with your DM to get the condition exactly right for your purposes.