Absolutely.

Your iMac should have come with at least 2GB of memory, which means that once Snow Leopard is installed and updated to OS 10.6.8, the iMac can be directly updated all the way to Yosemite (OS 10.10). (Snow Leopard only requires 1GB of memory, but extra memory is always good.)