iMessage is an internet messaging service. If you are not connected to a wifi network, then you need a cellular data connection. Without a SIM card and cellular data service, in the absence of wifi, iMessage simply cannot connect to Apple’s servers.
With an iPhone, you also need a SIM card and cellular service to initially setup an iMessage account for use on the phone. An iPhone needs SMS texting available to authenticate and initially set up an iMessage account.