When using 3G or 4G internet on my phone, is this running over the SIM card or is this similar to WLAN traffic?
Can a mobile network provider assign my mobile internet traffic to my phone by either the SIM card number or the IMEI of my phone?
All the things in mobile operators are assigned per SIM card. You have stored in HLR 3 parameters: MSISDN (your phone number), IMSI (internal customer identifier) and ICCID (SIM card serial number). Based on those parameters in different subsystems of mobile operator are created CDR (call detail record) for voice and data traffic. Once per month (for postpaid) and in the moment of usage (for prepaid) those CDRs are used to generate billing information for your account
IMЕI is not used for authentication/billing. The only moment when IMЕI is in charge is when this number is in black list of stolen or lost devices and depend of policies provider can permit or deny traffic (voice and/or data) to the device
P.S. And for each call, SMS, data packet is created such CDR. Sometime is possible mobile operator to sniff for data traffic (in charging proxy for example), but this depend of operator, law, etc.
SIM card is basically a smartcard with authentication data on it. The traffic doesn't go through the SIM card physically, the card is merely used for authentication and "logging in" to the provider network and is used by the operator for billing and other subscriber-specific operations. The traffic itself is then in a way similar to WLAN.